ssh/Dockerfile
2023-07-26 20:56:43 +10:00

28 lines
631 B
Docker

# NAME leenooks/ssh
# VERSION latest
FROM alpine
# Change to http respositories, so they we can cache the install packages
RUN if [ -n ${HTTP_PROXY} ] ; then sed -i -e s'/https/http/' /etc/apk/repositories; fi
ENV SSH_KEY_PATH=/etc/ssh/keys
# Base
RUN apk add --no-cache bash git unzip openssh
RUN sed -i -e "s:#HostKey\ /etc/ssh:HostKey ${SSH_KEY_PATH}:" /etc/ssh/sshd_config
RUN adduser -g "Hosting Admin User" -u 1000 -G www-data -h /var/www/html -HD lamp
# DB Clients
RUN apk add --no-cache mariadb-client postgresql-client
COPY init /sbin/
VOLUME [ "/etc/ssh/keys" ]
EXPOSE 22
# Starting
ENTRYPOINT [ "/sbin/init" ]