From 5e76e0a37781db4bb5e1acfa47e6d5e19347f6aa Mon Sep 17 00:00:00 2001 From: RipleyBooya Date: Fri, 21 Feb 2025 01:36:34 +0100 Subject: [PATCH] Create Dockerfile --- docker/Dockerfile | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 docker/Dockerfile diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 0000000..f7d7099 --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,23 @@ +# Use Alpine Linux +FROM alpine:latest + +# Install required packages, including `gettext` for `envsubst` +RUN apk add --no-cache openssh-client autossh bash logrotate gettext + +# Define required environment variables +ENV SSH_HOST="" +ENV SSH_USER="" +ENV REMOTE_PORTS="" +ENV LOCAL_PORTS="" + +# Create necessary directories +RUN mkdir -p /root/.ssh && chmod 700 /root/.ssh +RUN mkdir -p /var/log/ssh-tunnel && chmod 777 /var/log/ssh-tunnel + +# Copy scripts +COPY entrypoint.sh /entrypoint.sh +COPY logrotate.template /logrotate.template +RUN chmod +x /entrypoint.sh + +# Run the entrypoint script +CMD ["/entrypoint.sh"]