-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathDockerfile.guacd
More file actions
64 lines (45 loc) · 1.53 KB
/
Dockerfile.guacd
File metadata and controls
64 lines (45 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
FROM jumpserver/lion-base:20250818_063833 AS stage-build
ARG TARGETARCH
ARG GOPROXY=https://goproxy.io
ENV CGO_ENABLED=0
ENV GO111MODULE=on
COPY . .
WORKDIR /opt/lion/ui
RUN yarn build
WORKDIR /opt/lion/
ARG VERSION
ENV VERSION=$VERSION
RUN export GOFlAGS="-X 'main.Buildstamp=`date -u '+%Y-%m-%d %I:%M:%S%p'`'" \
&& export GOFlAGS="${GOFlAGS} -X 'main.Githash=`git rev-parse HEAD`'" \
&& export GOFlAGS="${GOFlAGS} -X 'main.Goversion=`go version`'" \
&& export GOFlAGS="${GOFlAGS} -X 'main.Version=${VERSION}'" \
&& go build -trimpath -x -ldflags "$GOFlAGS" -o lion .
RUN chmod +x entrypoint.sh
FROM guacamole/guacd:1.6.0
ARG TARGETARCH
ENV LANG=en_US.UTF-8
USER root
ARG DEPENDENCIES=" \
ca-certificates \
supervisor \
curl \
iputils-ping \
vim \
wget"
RUN set -ex \
&& apk update \
&& apk add ${DEPENDENCIES}
WORKDIR /opt/lion
COPY --from=stage-build /usr/local/bin/check /usr/local/bin/check
COPY --from=stage-build /opt/lion/ui/dist ui/dist/
COPY --from=stage-build /opt/lion/lion .
COPY --from=stage-build /opt/lion/config_example.yml .
COPY --from=stage-build /opt/lion/entrypoint.sh .
COPY --from=stage-build /opt/lion/supervisord.conf /etc/supervisor/supervisord.conf
ARG VERSION
ENV VERSION=$VERSION
VOLUME /opt/lion/data
ENTRYPOINT ["./entrypoint.sh"]
EXPOSE 8081
STOPSIGNAL SIGQUIT
CMD [ "supervisord", "-c", "/etc/supervisor/supervisord.conf" ]