Skip to content

Commit c5bfb88

Browse files
authored
setup for variable sshport (#7)
* setup for variable sshport * ssh port var support
1 parent c692e5d commit c5bfb88

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ RUN echo "https://dl-cdn.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositor
7373
&& curl -sSL https://github.com/natesales/q/releases/download/v0.19.2/q_0.19.2_linux_amd64.tar.gz | tar -xz -C /usr/local/bin q \
7474
&& chmod +x /usr/local/bin/q \
7575
&& chsh -s /bin/zsh root \
76-
&& echo 'alias dig="q"' >> /root/.zshrc \
76+
# && echo 'alias dig="q"' >> /root/.zshrc \
7777
## SSH Setup \
7878
&& ssh-keygen -A \
7979
&& echo -e "engage\nengage" | passwd root \
@@ -85,6 +85,7 @@ WORKDIR /echo-server
8585

8686
ENV PORT 80
8787
ENV SSLPORT 443
88+
ENV SSHPORT 22
8889

8990
ENTRYPOINT ["/run.sh"]
90-
CMD ["/echo-server/echo-server & /usr/sbin/sshd -D -e -o PermitRootLogin=yes -o Banner=/etc/issue.net & wait"]
91+
CMD ["/echo-server/echo-server & /usr/sbin/sshd -D -e -o Port=${SSHPORT} -o PermitRootLogin=yes -o Banner=/etc/issue.net & wait"]

run

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
echo -e "\nWelcome to Engage! There are a ton of tools in this container and echo-server is running so \"curl locahost\" for some quick details. \nMore details here: https://github.com/InAnimaTe/docker-engage"
44

5+
# Consume a different ssh port, or use the default.
6+
SSHPORT=${SSHPORT:-22}
7+
58
if [ "$LOOPMODE" ] && [ $LOOPINTERVAL ]; then
69
echo ">> Entering LoopMode with interval $LOOPINTERVAL..."
710
while true

0 commit comments

Comments
 (0)