FROM alpine:3.12.0 as production MAINTAINER isard RUN apk add python3 py3-pip py3-pyldap~=3.2.0 RUN pip3 install --upgrade pip RUN apk add --no-cache --virtual .build_deps \ build-base \ python3-dev \ libffi-dev COPY admin/docker/requirements.pip3 /requirements.pip3 RUN pip3 install --no-cache-dir -r requirements.pip3 RUN apk del .build_deps RUN apk add --no-cache curl py3-yaml yarn # SSH configuration ARG SSH_ROOT_PWD RUN apk add openssh RUN echo "root:$SSH_ROOT_PWD" |chpasswd RUN sed -i \ -e 's|[#]*PermitRootLogin prohibit-password|PermitRootLogin yes|g' \ -e 's|[#]*PasswordAuthentication yes|PasswordAuthentication yes|g' \ -e 's|[#]*ChallengeResponseAuthentication yes|ChallengeResponseAuthentication yes|g' \ -e 's|[#]*UsePAM yes|UsePAM yes|g' \ -e 's|[#]#Port 22|Port 22|g' \ /etc/ssh/sshd_config COPY admin/src /admin RUN cd /admin/admin && yarn install COPY admin/docker/docker-entrypoint.sh / ENTRYPOINT ["/docker-entrypoint.sh"] #EXPOSE 7039 WORKDIR /admin CMD [ "python3", "start.py" ]