28 lines
641 B
Docker
28 lines
641 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 /home/lamp -HD lamp
|
|
|
|
# DB Clients
|
|
RUN apk add --no-cache mariadb-client postgresql-client
|
|
|
|
COPY init /sbin/
|
|
|
|
|
|
VOLUME [ "/etc/ssh/keys","/home/lamp" ]
|
|
EXPOSE 22
|
|
|
|
# Starting
|
|
ENTRYPOINT [ "/sbin/init" ]
|