-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (32 loc) · 1.04 KB
/
Dockerfile
File metadata and controls
38 lines (32 loc) · 1.04 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
FROM alpine:3.3
# specify the git user's home and name
ENV GITHOME /home/git
ENV GITUSER git
# this is so the minio client (https://github.com/minio/mc) works properly
ENV DOCKERIMAGE=1
ENV DEIS_BUILDER_SERVER_SSH_HOST_IP=0.0.0.0
ENV DEIS_BUILDER_SERVER_SSH_HOST_PORT=2223
EXPOSE 2223
EXPOSE 3000
# install common packages, install & configure the SSH server, and set up directories, users & perms.
# NOTE: $GITUSER is added to docker group to use docker without sudo and to slug group in order to share resources with the slug user
RUN apk add --update-cache \
bash \
sudo \
git \
openssh \
coreutils \
tar \
xz \
&& rm -rf /var/cache/apk/* \
&& mkdir -p /var/run/sshd && rm -rf /etc/ssh/ssh_host* \
&& mkdir /apps \
&& adduser -D -h $GITHOME $GITUSER \
&& mkdir -p $GITHOME/.ssh && chown git:git $GITHOME/.ssh \
&& chown -R $GITUSER:$GITUSER $GITHOME \
&& addgroup -g 2000 slug && adduser -D -u 2000 -G slug slug \
&& addgroup $GITUSER slug \
&& passwd -u git
COPY . /
ENV DEIS_RELEASE 2.0.0-dev
ENTRYPOINT ["boot", "server"]