-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (27 loc) · 782 Bytes
/
Dockerfile
File metadata and controls
37 lines (27 loc) · 782 Bytes
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
FROM docker.io/minio/mc:latest as mc
FROM docker.io/drycc/go-dev:latest AS build
ARG LDFLAGS
ADD . /app
RUN export GO111MODULE=on \
&& cd /app \
&& CGO_ENABLED=0 go build -ldflags "${LDFLAGS}" -o /usr/local/bin/boot boot.go
FROM docker.io/library/alpine:3.12
RUN adduser \
-s /bin/sh \
-D \
-h /home/git \
git \
git
COPY rootfs /
COPY --from=mc /usr/bin/mc /bin/mc
COPY --from=build /usr/local/bin/boot /usr/bin/boot
RUN apk add --update git sudo openssh-server coreutils tar xz jq bash \
&& mkdir -p /var/run/sshd \
&& rm -rf /etc/ssh/ssh_host* \
&& mkdir /apps \
&& passwd -u git \
&& chmod +x /bin/create_bucket /bin/normalize_storage /docker-entrypoint.sh
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["/usr/bin/boot", "server"]
EXPOSE 2223
EXPOSE 3000