-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile-docker-client
25 lines (17 loc) · 1.03 KB
/
Dockerfile-docker-client
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
FROM docker.io/ubuntu:latest
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y docker openssh-server default-jdk && \
apt-get install -y apt-transport-https ca-certificates curl gnupg-agent git wget sshpass rsync \
software-properties-common && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - && \
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" && \
apt-get update && apt-get install docker-ce-cli -y && \
curl -L "https://github.com/docker/compose/releases/download/1.26.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/bin/docker-compose && \
chmod +x /usr/bin/docker-compose
RUN mkdir /var/run/sshd
RUN echo 'root:root' | chpasswd
RUN sed -ri 's/^#?PermitRootLogin\s+.*/PermitRootLogin yes/' /etc/ssh/sshd_config
RUN sed -ri 's/UsePAM yes/#UsePAM yes/g' /etc/ssh/sshd_config
RUN sed -ri 's/^#Subsystem sftp/Subsystem sftp/g' /etc/ssh/sshd_config
RUN mkdir /root/.ssh
EXPOSE 22
CMD ["/usr/sbin/sshd", "-D"]