Skip to content

Commit

Permalink
install SSH server
Browse files Browse the repository at this point in the history
  • Loading branch information
sheppard committed Nov 16, 2023
1 parent 0d31d3f commit 40a5136
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ FROM python:3.11-bookworm
RUN apt-get update && apt-get install -y libgdal32 libsqlite3-mod-spatialite
RUN python -m pip install wq gunicorn whitenoise

# Install SSH server (for e.g. Azure)
RUN apt-get install -y openssh-server && echo "root:Docker!" | chpasswd
COPY sshd_config /etc/ssh/

# Install node and npm
RUN \
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
Expand Down
13 changes: 13 additions & 0 deletions sshd_config
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# See https://learn.microsoft.com/en-us/azure/app-service/configure-custom-container#enable-ssh
Port 2222
ListenAddress 0.0.0.0
LoginGraceTime 180
X11Forwarding yes
Ciphers aes128-cbc,3des-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr
MACs hmac-sha1,hmac-sha1-96
StrictModes yes
SyslogFacility DAEMON
PasswordAuthentication yes
PermitEmptyPasswords no
PermitRootLogin yes
Subsystem sftp internal-sftp

0 comments on commit 40a5136

Please sign in to comment.