-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (21 loc) · 731 Bytes
/
Copy pathDockerfile
File metadata and controls
31 lines (21 loc) · 731 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
FROM alpine:3.6
RUN apk add --no-cache openssh git
RUN apk add --no-cache --virtual config_editing sed \
&& sed -i /etc/ssh/sshd_config \
-e 's/#PasswordAuthentication yes/PasswordAuthentication no/g' \
-e 's/#AllowAgentForwarding yes/AllowAgentForwarding no/g' \
-e 's/#AllowTcpForwarding yes/AllowTcpForwarding no/g' \
-e 's|#HostKey /etc/ssh/|HostKey /git/data/keys/|g' \
&& apk del config_editing
RUN mkdir -p /git/data \
&& mkdir -p /git/data/keys \
&& mkdir -p /git/data/users
WORKDIR /git
COPY skel /etc/skel
COPY add_git_user.sh ./
COPY del_git_user.sh ./
COPY bootstrap.sh ./
RUN touch /var/log/messages
EXPOSE 22
VOLUME /git/data
ENTRYPOINT ["/git/bootstrap.sh"]