Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
4d87ba71b5 | |||
89cdaafb45 | |||
0764e7e029 | |||
5b6c6fa7ca | |||
6d491fee77 | |||
8f5c285254 | |||
dc2afd87dc | |||
fa3187e2a3 |
@ -1,5 +1,3 @@
|
||||
variables:
|
||||
FF_DISABLE_UMASK_FOR_DOCKER_EXECUTOR: 1
|
||||
include:
|
||||
- project: dockerized/commons
|
||||
ref: master
|
||||
|
19
Dockerfile
19
Dockerfile
@ -5,15 +5,30 @@ ARG APP_DIR="/opt/app"
|
||||
RUN \
|
||||
apt update && \
|
||||
apt install -y cron && \
|
||||
apt install -y openssh-server && \
|
||||
apt install -y curl && \
|
||||
mkdir -p ${APP_DIR} && \
|
||||
useradd -d ${APP_DIR} -u 1000 user
|
||||
useradd -d ${APP_DIR} -u 1000 user && \
|
||||
mkdir -p ${APP_DIR}/.ssh && \
|
||||
curl https://home.hottis.de/mysshkeys.pub > ${APP_DIR}/.ssh/authorized_keys
|
||||
|
||||
|
||||
COPY crontab /etc/
|
||||
COPY testscript.sh ${APP_DIR}/
|
||||
COPY start.sh ${APP_DIR}/
|
||||
COPY sshd_config /etc/ssh
|
||||
|
||||
RUN \
|
||||
mkdir -p /var/run/sshd && \
|
||||
/usr/bin/ssh-keygen -A
|
||||
|
||||
EXPOSE 2222
|
||||
|
||||
VOLUME /opt/data
|
||||
|
||||
# USER 1000:1000
|
||||
WORKDIR ${APP_DIR}
|
||||
|
||||
CMD [ "/usr/sbin/cron", "-f" ]
|
||||
CMD [ "/opt/app/start.sh" ]
|
||||
|
||||
|
||||
|
12
sshd_config
Normal file
12
sshd_config
Normal file
@ -0,0 +1,12 @@
|
||||
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 no
|
||||
PermitEmptyPasswords no
|
||||
PermitRootLogin no
|
||||
Subsystem sftp internal-sftp
|
Reference in New Issue
Block a user