update
parent
4b82951395
commit
7afb2af594
28
Dockerfile
28
Dockerfile
|
@ -2,8 +2,6 @@ FROM golang:1.17.2
|
||||||
|
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
|
|
||||||
RUN touch shell.sh
|
|
||||||
|
|
||||||
RUN \
|
RUN \
|
||||||
# gterm \
|
# gterm \
|
||||||
curl -fsSL https://kumoly.io/attachments/e4bdde2a-4247-446f-a734-df3962c8b83b | tar -C /usr/local/bin/ -xz &&\
|
curl -fsSL https://kumoly.io/attachments/e4bdde2a-4247-446f-a734-df3962c8b83b | tar -C /usr/local/bin/ -xz &&\
|
||||||
|
@ -11,36 +9,33 @@ curl -fsSL https://kumoly.io/attachments/e4bdde2a-4247-446f-a734-df3962c8b83b |
|
||||||
curl -fsSL https://kumoly.io/attachments/9994192c-eca8-481c-bdb9-3d9f440c5c53 | tar -C /usr/local/bin/ -xz &&\
|
curl -fsSL https://kumoly.io/attachments/9994192c-eca8-481c-bdb9-3d9f440c5c53 | tar -C /usr/local/bin/ -xz &&\
|
||||||
curl -fsSL https://github.com/caddyserver/caddy/releases/download/v2.4.6/caddy_2.4.6_linux_amd64.tar.gz | tar -C /usr/local/bin/ -xz
|
curl -fsSL https://github.com/caddyserver/caddy/releases/download/v2.4.6/caddy_2.4.6_linux_amd64.tar.gz | tar -C /usr/local/bin/ -xz
|
||||||
|
|
||||||
RUN echo '#!/bin/bash\n\
|
RUN touch shell.sh && \
|
||||||
|
echo '#!/bin/bash\n\
|
||||||
echo "starting shell service..."\n\
|
echo "starting shell service..."\n\
|
||||||
gterm -addr :8080 -name GoPlayground -arg "--rcfile" -arg <(gterm -profile) &\n\
|
cd /root && gterm -addr :8080 -name GoPlayground -arg "--rcfile" -arg <(gterm -profile) &\n\
|
||||||
echo "starting configui..."\n\
|
echo "starting configui..."\n\
|
||||||
configui -log configui.log -f conf.json -bind :8001 &\n\
|
configui -log configui.log -f conf.json -bind :8001 &\n\
|
||||||
caddy run --config Caddyfile\n\
|
caddy run --config Caddyfile\n\
|
||||||
' > /entrypoint.sh
|
' > /entrypoint.sh && \
|
||||||
|
echo '\
|
||||||
RUN echo '\
|
|
||||||
:8000 {\n\
|
:8000 {\n\
|
||||||
route /sh/* {\n\
|
route /sh/* {\n\
|
||||||
uri strip_prefix /sh\n\
|
uri strip_prefix /sh\n\
|
||||||
reverse_proxy localhost:8080\n\
|
reverse_proxy localhost:8080\n\
|
||||||
}\n\
|
}\n\
|
||||||
reverse_proxy localhost:8001\n\
|
reverse_proxy localhost:8001\n\
|
||||||
}' > Caddyfile
|
}' > Caddyfile && \
|
||||||
|
echo '\
|
||||||
RUN echo '\
|
|
||||||
{{ define "links" }}\n\
|
{{ define "links" }}\n\
|
||||||
<a class="button is-white level-item" \n\
|
<a class="button is-white level-item" \n\
|
||||||
href="sh/"\n\
|
href="sh/"\n\
|
||||||
>Shell</a>\n\
|
>Shell</a>\n\
|
||||||
{{end}}\n\
|
{{end}}\n\
|
||||||
' > links.tmpl
|
' > links.tmpl && \
|
||||||
|
echo '{"app_name":"Go Playground","no_reconfig":true \
|
||||||
RUN echo '{"app_name":"Go Playground","no_reconfig":true \
|
|
||||||
,"files":[{"path":"main.go","name":"Main","action":"go run main.go","order":-1},{"path":"shell.sh","name":"Shell","action":"bash shell.sh","order":1}] \
|
,"files":[{"path":"main.go","name":"Main","action":"go run main.go","order":-1},{"path":"shell.sh","name":"Shell","action":"bash shell.sh","order":1}] \
|
||||||
,"hide_config":true,"cust":"."}' > conf.json
|
,"hide_config":true,"cust":"."}' > conf.json && \
|
||||||
|
echo 'package main\n\
|
||||||
RUN echo 'package main\n\
|
|
||||||
\n\
|
\n\
|
||||||
import "fmt"\n\
|
import "fmt"\n\
|
||||||
\n\
|
\n\
|
||||||
|
@ -48,5 +43,4 @@ func main() {\n\
|
||||||
fmt.Println("Hello, world.")\n\
|
fmt.Println("Hello, world.")\n\
|
||||||
}\n' > main.go
|
}\n' > main.go
|
||||||
|
|
||||||
|
|
||||||
ENTRYPOINT ["/bin/bash","/entrypoint.sh"]
|
ENTRYPOINT ["/bin/bash","/entrypoint.sh"]
|
||||||
|
|
Loading…
Reference in New Issue