mirror of
https://github.com/alexhopeoconnor/SunGather.git
synced 2026-10-04 02:48:12 +10:00
27 lines
563 B
Docker
27 lines
563 B
Docker
FROM python:3 as builder
|
|
|
|
RUN python3 -m venv /opt/virtualenv \
|
|
&& apt-get update \
|
|
&& apt-get install build-essential
|
|
|
|
COPY requirements.txt ./
|
|
RUN /opt/virtualenv/bin/pip3 install --no-cache-dir -r requirements.txt
|
|
|
|
FROM python:3-slim
|
|
|
|
RUN useradd -r -m sungather
|
|
|
|
COPY --from=builder /opt/virtualenv /opt/virtualenv
|
|
|
|
WORKDIR /opt/sungather
|
|
|
|
COPY SunGather/ .
|
|
|
|
VOLUME /logs
|
|
VOLUME /config
|
|
COPY SunGather/config-example.yaml /config/config.yaml
|
|
|
|
USER sungather
|
|
|
|
CMD [ "/opt/virtualenv/bin/python", "sungather.py", "-c", "/config/config.yaml", "-l", "/logs/" ]
|