forked from plusiv/portainer-deployer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
29 lines (22 loc) · 894 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Set Image versions
ARG PYTHON_VERSION=3.10.12
#ARG ALPINE_VERSION=3.14
FROM python:${PYTHON_VERSION}-bookworm
# Set Environment Variables
ENV WORKDIR /app
ENV PORTAINER_DEPLOYER_CONF_DIR /etc/portainer-deployer
ENV PORTAINER_DEPLOYER_CONF_FILE app.conf
ENV PAKG_FOLDER portainer_deployer
WORKDIR ${WORKDIR}
# Copy application files
COPY . .
RUN mkdir -p ${PORTAINER_DEPLOYER_CONF_DIR} && \
cp -a ${WORKDIR}/${PAKG_FOLDER}/app.conf.example ${PORTAINER_DEPLOYER_CONF_DIR}/${PORTAINER_DEPLOYER_CONF_FILE}
# Install application and configure it
RUN python -m pip install --upgrade pip && \
python -m pip install -r requirements.txt && \
python -m pip install . && \
portainer-deployer config --config-path ${PORTAINER_DEPLOYER_CONF_DIR}/${PORTAINER_DEPLOYER_CONF_FILE} && \
chmod +x /app/entrypoint.sh
# Run application
ENTRYPOINT ["/bin/bash", "/app/entrypoint.sh"]