mirror of
https://github.com/RipleyBooya/ssh-tunnel.git
synced 2025-12-15 09:08:39 +01:00
Create Dockerfile
This commit is contained in:
parent
e477db3f93
commit
5e76e0a377
1 changed files with 23 additions and 0 deletions
23
docker/Dockerfile
Normal file
23
docker/Dockerfile
Normal 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"]
|
||||||
Loading…
Add table
Reference in a new issue