Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,19 @@ RUN rm /etc/motd

###
# set a password to SSH into the docker container with
RUN adduser -D -h /home/user -s /bin/bash user
RUN adduser user wheel
RUN adduser -D -h /home/admin -s /bin/bash admin
RUN adduser admin wheel
RUN sed -i 's/# %wheel ALL=(ALL:ALL) ALL/%wheel ALL=(ALL:ALL) NOPASSWD: ALL/g' /etc/sudoers
RUN echo 'user:multit00l' | chpasswd
# copy a basic but nicer than standard bashrc for the user
COPY .bashrc /home/user/.bashrc
RUN chown user:user /home/user/.bashrc
RUN echo 'admin:multit00l' | chpasswd
# copy a basic but nicer than standard bashrc for the user 'admin'
COPY .bashrc /home/admin/.bashrc
RUN chown admin:admin /home/admin/.bashrc
# Ensure .bashrc is sourced by creating a .bash_profile that sources .bashrc
RUN echo 'if [ -f ~/.bashrc ]; then . ~/.bashrc; fi' > /home/user/.bash_profile
RUN echo 'if [ -f ~/.bashrc ]; then . ~/.bashrc; fi' > /home/admin/.bash_profile
# Ensure configs in /etc/ssh/ssh_config.d/ are included
RUN echo "Include /etc/ssh/ssh_config.d/*" >> /etc/ssh/ssh_config
# Change ownership of the home directory to the user
RUN chown -R user:user /home/user
# Change ownership of the home directory to the user 'admin'
RUN chown -R admin:admin /home/admin
###

COPY index.html /usr/share/nginx/html/
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ This container image is often used in containerlabs to emulate a client. The ima

To connect to this image users can use

* `ssh user@<name>`. Password `multit00l`.
* `ssh admin@<name>`. Password `multit00l`.
* or `docker exec -i -t <name> bash`