mgm-image/Dockerfile
Adam Štrauch 8c81737b87
Some checks failed
Build a dev image / build (push) Has been cancelled
Initial commit
2025-09-27 00:25:22 +02:00

38 lines
886 B
Docker

FROM alpine:3.22
RUN apk update && apk upgrade && apk add --no-cache \
git \
docker \
bash \
fish \
zsh \
wget \
curl \
htop \
vim \
nano \
tmux \
openssh-server \
iproute2
# Download ttyd
RUN wget -O /usr/local/bin/ttyd https://github.com/tsl0922/ttyd/releases/download/1.7.7/ttyd.x86_64 && chmod +x /usr/local/bin/ttyd
# Configure SSH
RUN mkdir -p /var/run/sshd && \
sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config && \
sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/' /etc/ssh/sshd_config
# Copy entrypoint script
COPY entrypoint.sh /app/
COPY service.ssh.sh /app/
COPY service.ttyd.sh /app/
RUN chmod +x /app/entrypoint.sh /app/service.ssh.sh /app/service.ttyd.sh
RUN mkdir -p /srv/stack
WORKDIR /srv/stack
EXPOSE 22 1234
ENTRYPOINT ["/app/entrypoint.sh"]