File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,11 +8,12 @@ RUN export GO111MODULE=on \
88
99FROM docker.io/drycc/base:bullseye
1010
11- RUN adduser --system \
12- --shell /bin/sh \
13- --home /home/git \
14- --group \
15- git
11+ ARG DRYCC_UID=1001
12+ ARG DRYCC_GID=1001
13+ ARG DRYCC_HOME_DIR=/workspace
14+
15+ RUN groupadd drycc --gid ${DRYCC_GID} \
16+ && useradd drycc -u ${DRYCC_UID} -g ${DRYCC_GID} -s /bin/bash -m -d ${DRYCC_HOME_DIR}
1617
1718COPY rootfs/bin /bin/
1819COPY rootfs/etc/ssh /etc/ssh/
@@ -27,11 +28,10 @@ RUN install-packages git openssh-server coreutils xz-utils tar \
2728 && install-stack jq $JQ_VERSION \
2829 && mkdir -p /var/run/sshd \
2930 && rm -rf /etc/ssh/ssh_host* \
30- && passwd -u git \
3131 && chmod +x /bin/create_bucket /bin/normalize_storage /docker-entrypoint.sh
3232
33- USER git
34- WORKDIR /home/git
33+ USER drycc
34+ WORKDIR ${DRYCC_HOME_DIR}
3535
3636ENTRYPOINT ["init-stack" , "/docker-entrypoint.sh" ]
3737CMD ["/usr/bin/boot" , "server" ]
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ import (
2424const (
2525 serverConfAppName = "drycc-builder-server"
2626 gitReceiveConfAppName = "drycc-builder-git-receive"
27- gitHomeDir = "/home/git "
27+ gitHomeDir = "/workspace "
2828)
2929
3030func init () {
Original file line number Diff line number Diff line change 2626 - name : drycc-builder-init
2727 image : docker.io/drycc/python-dev:latest
2828 imagePullPolicy : {{.Values.imagePullPolicy}}
29- command :
29+ args :
3030 - netcat
3131 - -v
3232 - -a
Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ func build(
7979 repoDir := filepath .Join (conf .GitHome , repo )
8080 buildDir := filepath .Join (repoDir , "build" )
8181
82- if err := os .MkdirAll (buildDir , os . ModeDir ); err != nil {
82+ if err := os .MkdirAll (buildDir , 0700 ); err != nil {
8383 return fmt .Errorf ("making the build directory %s (%s)" , buildDir , err )
8484 }
8585
You can’t perform that action at this time.
0 commit comments