parent
594b01679a
commit
cebe2eb705
@ -1,12 +1,11 @@ |
||||
FROM 3.11.1-alpine3.17 |
||||
FROM python:3.11.1-alpine3.17 |
||||
|
||||
RUN adduser -D app && apk update && apk add fetchmail |
||||
RUN adduser -D app && apk update && apk add fetchmail runuser |
||||
|
||||
USER app |
||||
WORKDIR /app |
||||
COPY ./requirements.txt /home/app/requirements.txt |
||||
COPY ./pmml.py /home/app/pmml.py |
||||
COPY ./entrypoint.sh /home/app/entrypoint.sh |
||||
|
||||
COPY ./requirements.txt ./requirements.txt |
||||
RUN pip install -r /home/app/requirements.txt |
||||
|
||||
RUN pip install -r requirements.txt |
||||
|
||||
ENTRYPOINT ["fetchmail"] |
||||
ENTRYPOINT ["/home/app/entrypoint.sh"] |
||||
|
||||
@ -0,0 +1,9 @@ |
||||
#!/bin/sh |
||||
|
||||
DOCKER_USER=app |
||||
DOCKER_HOME=/home/app |
||||
|
||||
chown app $DOCKER_HOME/.fetchmailrc |
||||
chown app $DOCKER_HOME/pmml.py |
||||
chown app $DOCKER_HOME/.pmmlrc |
||||
exec runuser -u $DOCKER_USER -- fetchmail -d 60 -N |
||||
Loading…
Reference in new issue