timetracker/Dockerfile

16 lines
513 B
Docker
Raw Normal View History

2023-01-02 17:11:43 +00:00
FROM python:3.10-slim-bullseye
ENV VIRTUAL_ENV=/opt/venv
RUN python3 -m venv pip $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
RUN pip install --no-cache-dir poetry
RUN useradd --create-home --uid 1000 timetracker
WORKDIR /home/timetracker/app
2023-01-03 13:29:39 +00:00
COPY . /home/timetracker/app/
RUN chown -R timetracker:timetracker /home/timetracker/app
RUN poetry install --without dev
COPY entrypoint.sh /
RUN chmod +x /entrypoint.sh
2023-01-02 17:26:24 +00:00
USER timetracker
2023-01-03 13:29:39 +00:00
EXPOSE 8000
2023-01-04 18:32:18 +00:00
ENV VERSION_NUMBER 0.1.0-16-g12cc902
2023-01-03 13:29:39 +00:00
ENTRYPOINT [ "/entrypoint.sh" ]