Skip to content

Commit

Permalink
add ubuntu Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
ChangZihao committed May 25, 2018
1 parent 8a482e7 commit ea4c49b
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions ubuntu/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
FROM ubuntu:16:04

# new a directory for sshd to run
RUN mkdir -p /var/run/sshd

# installing ssh server
RUN apt-get update
RUN apt-get install -y openssh-server wget tmux vim zsh

# installing sudo
# RUN apt-get install -y sudo

# make ssh services use IPv4 to let X11 forwarding work correctly
RUN echo AddressFamily inet >> /etc/ssh/sshd_config

# defining user account imformation
ARG username=czh
ARG userpasswd=czh

# adding user
RUN useradd -ms /bin/bash $username && (echo $username:$userpasswd | chpasswd)

# adding user to sudo group
RUN adduser $username sudo

# setting running application
CMD /usr/sbin/sshd -D

0 comments on commit ea4c49b

Please sign in to comment.