Skip to content

Commit 96dc3fc

Browse files
authored
Merge pull request #14 from jianxiaoguo/main
chore(dockerfile): change user and workdir
2 parents 9ad506d + ecaa3bd commit 96dc3fc

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
FROM docker.io/drycc/go-dev:latest AS build
22
ARG LDFLAGS
3-
ADD . /app
3+
ADD . /workspace
44
RUN export GO111MODULE=on \
5-
&& cd /app \
5+
&& cd /workspace \
66
&& CGO_ENABLED=0 init-stack go build -ldflags "${LDFLAGS}" -o /usr/local/bin/boot boot.go
77

88

@@ -27,12 +27,13 @@ RUN install-packages git openssh-server coreutils xz-utils tar \
2727
&& install-stack jq $JQ_VERSION \
2828
&& mkdir -p /var/run/sshd \
2929
&& rm -rf /etc/ssh/ssh_host* \
30-
&& mkdir /apps \
3130
&& passwd -u git \
3231
&& chmod +x /bin/create_bucket /bin/normalize_storage /docker-entrypoint.sh
3332

34-
ENTRYPOINT ["init-stack", "/docker-entrypoint.sh"]
33+
USER git
34+
WORKDIR /home/git
3535

36+
ENTRYPOINT ["init-stack", "/docker-entrypoint.sh"]
3637
CMD ["/usr/bin/boot", "server"]
3738

3839
EXPOSE 2223

0 commit comments

Comments
 (0)