Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

impr(Optimization): Optimized Dockerfiles, Reduced image size. (@Ilolm) #10490

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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: 12 additions & 6 deletions ssh/baseline-configs/fedora+/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
FROM fedora:latest

RUN dnf install -y openssh-server wget
RUN dnf check-update || true && \
dnf install -y openssh-server wget && \
dnf clean all && \

RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
RUN sed -i 's/#AllowTcpForwarding yes/AllowTcpForwarding yes/' /etc/ssh/sshd_config
# Configuring ssh config
sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config && \
sed -i 's/#AllowTcpForwarding yes/AllowTcpForwarding yes/' /etc/ssh/sshd_config && \

RUN ssh-keygen -A
# Generating ssh keys
ssh-keygen -A && \

RUN echo "root:foobar" | chpasswd
# Changing root password
echo "root:foobar" | chpasswd

EXPOSE 5670
CMD ["/usr/sbin/sshd", "-D", "-p", "5670"]

CMD ["/usr/sbin/sshd", "-D", "-p", "5670"]
18 changes: 12 additions & 6 deletions ssh/baseline-configs/fedora/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
FROM fedora:latest

RUN dnf install -y openssh-server
RUN dnf check-update || true && \
dnf install -y openssh-server && \
dnf clean all && \

RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
RUN sed -i 's/#AllowTcpForwarding yes/AllowTcpForwarding yes/' /etc/ssh/sshd_config
# Configuring ssh config
sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config && \
sed -i 's/#AllowTcpForwarding yes/AllowTcpForwarding yes/' /etc/ssh/sshd_config && \

RUN ssh-keygen -A
# Generating ssh keys
ssh-keygen -A && \

RUN echo "root:foobar" | chpasswd
# Changing root password
echo "root:foobar" | chpasswd

# TODO: expose only on an isolated docker network to avoid conflicts?
# Think about how extension would communicate
EXPOSE 5671
CMD ["/usr/sbin/sshd", "-D", "-p", "5671"]

CMD ["/usr/sbin/sshd", "-D", "-p", "5671"]