simple-cron-docker/Dockerfile
Wolfgang Hottgenroth dc2afd87dc enable ssh for Azure
2022-07-20 16:12:35 +02:00

30 lines
452 B
Docker

FROM debian:bullseye
ARG APP_DIR="/opt/app"
RUN \
apt update && \
apt install -y cron && \
apt install -y openssh-server && \
mkdir -p ${APP_DIR} && \
useradd -d ${APP_DIR} -u 1000 user
COPY crontab /etc/
COPY testscript.sh ${APP_DIR}/
COPY sshd_config /etc/ssh
RUN \
mkdir -p /var/run/sshd && \
/usr/bin/ssh-keygen -A
EXPOSE 2222
# USER 1000:1000
WORKDIR ${APP_DIR}
CMD [ "/opt/app/start.sh" ]
# CMD [ "/usr/sbin/cron", "-f" ]