pysmtp/dockerfiles/Dockerfile.server

23 lines
469 B
Docker
Raw Normal View History

2021-12-28 03:01:00 -03:00
FROM python:3-slim
# set a directory for the app
WORKDIR /srv
# install dependencies
COPY mayordomo/requirements.txt /srv
RUN pip3 install --no-cache-dir -r requirements.txt
# copy all the files to the container
COPY mayordomo /srv/mayordomo
COPY server.py /srv
# define the port number the container should expose
EXPOSE 10025
RUN useradd -m mayordomo
RUN chown -R mayordomo:mayordomo /srv
USER mayordomo
# run the command
ENTRYPOINT ["python"]
CMD ["server.py"]