23 lines
470 B
Docker
23 lines
470 B
Docker
|
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 sender.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 ["sender.py"]
|