-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Your Name
committed
Nov 26, 2024
1 parent
682ee28
commit 0f7cadd
Showing
25 changed files
with
4,201 additions
and
7,611 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,42 +5,28 @@ WORKDIR ./opt/topoviewer | |
|
||
USER root:root | ||
|
||
# RUN echo 'root:admin' | chpasswd | ||
|
||
# add users | ||
# RUN useradd -rm -d /home/ubuntu -s /bin/bash -g root -G sudo -u 1001 suuser | ||
# RUN echo 'suuser:suuser' | chpasswd | ||
# RUN useradd -rm -d /home/ubuntu -s /bin/bash -g root -G sudo -u 1002 admin | ||
# RUN echo 'admin:admin' | chpasswd | ||
|
||
# # Install packages | ||
# RUN apt-get update && apt-get install -y openssh-server iproute2 iputils-ping vim wget sudo | ||
|
||
# # Config SSH | ||
# RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config | ||
# RUN echo "HostKeyAlgorithms ssh-dss,ecdsa-sha2-nistp256,ssh-ed25519" >> /etc/ssh/ssh_config | ||
# RUN echo "KexAlgorithms diffie-hellman-group1-sha1,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1" >> /etc/ssh/ssh_config | ||
|
||
# # Download dist folder | ||
# COPY ./dist /opt/topoviewer | ||
# Set Environment Variables | ||
ENV TERM=xterm-256color \ | ||
COLORTERM=truecolor \ | ||
LANG=en_US.UTF-8 | ||
|
||
# Consolidate RUN Commands | ||
RUN echo 'root:admin' | chpasswd && \ | ||
useradd -rm -d /home/ubuntu -s /bin/bash -g root -G sudo -u 1001 suuser && \ | ||
echo 'suuser:suuser' | chpasswd && \ | ||
useradd -rm -d /home/ubuntu -s /bin/bash -g root -G sudo -u 1002 admin && \ | ||
echo 'admin:admin' | chpasswd && \ | ||
apt-get update && apt-get install -y openssh-server iproute2 iputils-ping vim wget sudo curl rsyslog && \ | ||
sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config && \ | ||
echo "HostKeyAlgorithms ssh-dss,ecdsa-sha2-nistp256,ssh-ed25519" >> /etc/ssh/ssh_config && \ | ||
echo "HostKeyAlgorithms ssh-dss,ecdsa-sha2-nistp256,ssh-ed25519" >> /etc/ssh/ssh_config && \ | ||
echo "KexAlgorithms diffie-hellman-group1-sha1,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1" >> /etc/ssh/ssh_config | ||
useradd -rm -d /home/ubuntu -s /bin/bash -g root -G sudo -u 1001 suuser && \ | ||
echo 'suuser:suuser' | chpasswd && \ | ||
useradd -rm -d /home/ubuntu -s /bin/bash -g root -G sudo -u 1002 admin && \ | ||
echo 'admin:admin' | chpasswd && \ | ||
apt-get update && apt-get install -y openssh-server iproute2 iputils-ping vim wget sudo curl rsyslog && \ | ||
sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config && \ | ||
echo "HostKeyAlgorithms ssh-dss,ecdsa-sha2-nistp256,ssh-ed25519" >> /etc/ssh/ssh_config && \ | ||
echo "HostKeyAlgorithms ssh-dss,ecdsa-sha2-nistp256,ssh-ed25519" >> /etc/ssh/ssh_config && \ | ||
echo "KexAlgorithms diffie-hellman-group1-sha1,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1" >> /etc/ssh/ssh_config | ||
|
||
# Download dist folder | ||
COPY ./dist /opt/topoviewer | ||
|
||
#expose port | ||
# Expose ports | ||
EXPOSE 8080 22 514 | ||
|
||
ENTRYPOINT rsyslogd && service ssh restart && bash | ||
|
||
# Entry point | ||
ENTRYPOINT rsyslogd && service ssh restart && bash |
Binary file not shown.
Oops, something went wrong.