-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes: Updated aligned with review comments. Removed base image for…
… opensuse leap as it is the default for the docker file. Changed the openSUSE version tag format on the README. Removed shadow installation and addition of password authentication to the sshd config file.
- Loading branch information
1 parent
a03578e
commit 7a3c1a6
Showing
3 changed files
with
11 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,18 @@ | ||
ARG BASEIMAGE=opensuse/leap | ||
ARG BASEIMAGE=docker.io/opensuse/leap | ||
ARG TAG=latest | ||
|
||
FROM ${BASEIMAGE}:${TAG} | ||
ARG UPDATED=false | ||
|
||
RUN if [ "$UPDATED" = true ]; then zypper refresh && zypper update -y; fi \ | ||
&& zypper install -y openssh shadow \ | ||
&& zypper install -y openssh \ | ||
&& zypper clean \ | ||
&& useradd -m demo \ | ||
&& echo "demo:demo" | chpasswd \ | ||
&& ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N "" \ | ||
&& (ssh-keygen -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key -N "" || true) \ | ||
&& (ssh-keygen -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -N "" || true) \ | ||
&& [ ! -f /etc/ssh/sshd_config ] && /usr/sbin/sshd -t || true \ | ||
&& touch /etc/ssh/sshd_config \ | ||
&& echo "PasswordAuthentication yes" >> /etc/ssh/sshd_configc | ||
&& (ssh-keygen -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -N "" || true) | ||
|
||
CMD [ "/usr/sbin/sshd", "-D" ] | ||
|
||
EXPOSE 22 | ||
EXPOSE 22 |