38 lines
		
	
	
	
		
			886 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
			
		
		
	
	
			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"]
 | 
						|
 |