Files
webssh/Dockerfile
Kenson Man 309d912985 Change the Docker base image from python:3-slim to python:3-alpine.
The final image will be ~79.6MB instead of 163MB. It has 48% smaller.
2022-05-27 12:47:19 +01:00

19 lines
417 B
Docker

FROM python:3-alpine
LABEL maintainer='<author>'
LABEL version='0.0.0-dev.0-build.0'
ADD . /code
WORKDIR /code
RUN \
apk add --no-cache libc-dev libffi-dev gcc && \
pip install -r requirements.txt --no-cache-dir && \
apk del gcc libc-dev libffi-dev && \
addgroup webssh && \
adduser -Ss /bin/false -g webssh webssh && \
chown -R webssh:webssh /code
EXPOSE 8888/tcp
USER webssh
CMD ["python", "run.py"]