-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (30 loc) · 970 Bytes
/
Dockerfile
File metadata and controls
40 lines (30 loc) · 970 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
38
39
40
FROM ruby:3.1.1-alpine
RUN apk fix \
&& apk --update add git git-lfs openssh docker-compose bash sudo docker
RUN mkdir -p /root/.ssh \
&& chmod 700 /root/.ssh \
&& ssh-keygen -A
RUN addgroup -S docco \
&& adduser -G docco -h /home/docco \
-s /usr/bin/git-shell -D docco \
&& passwd -u docco \
&& adduser docco wheel \
&& mkdir -p /etc/sudoers.d \
&& echo '%wheel ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/wheel \
&& chmod 0440 /etc/sudoers.d/wheel
WORKDIR /home/docco
RUN mkdir .ssh && chmod 700 .ssh
COPY docco docco
COPY scripts scripts
COPY lib lib
COPY Gemfile Gemfile.lock ./
RUN ln -s scripts git-shell-commands
COPY docco-docker.env docco.env
RUN bundle config set --local path 'vendor/bundle'
RUN bundle install -j4
RUN chown -R docco:docco /home/docco
RUN sudo -u docco bundle config set --local path 'vendor/bundle'
COPY sshd_config /etc/ssh/sshd_config
COPY start.sh start.sh
EXPOSE 22
CMD ["sh", "start.sh"]