Create Dockerfile

This commit is contained in:
RipleyBooya 2025-02-21 01:36:34 +01:00 committed by GitHub
parent e477db3f93
commit 5e76e0a377
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

23
docker/Dockerfile Normal file
View file

@ -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"]