chore: optimize image build
This commit is contained in:
parent
0d9a175438
commit
f63d1b185b
2 changed files with 7 additions and 5 deletions
|
@ -1,7 +1,8 @@
|
|||
FROM docker.io/python:slim
|
||||
RUN bash -c 'mkdir /app;\
|
||||
python -m venv /venv;\
|
||||
/venv/bin/pip install -r requirements.txt; '
|
||||
python -m venv /venv;'
|
||||
COPY requirements.txt /app/
|
||||
RUN /venv/bin/pip install -r requirements.txt
|
||||
COPY static /app/static
|
||||
COPY templates /app/templates
|
||||
COPY wg_manager /app/wg_manager
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
FROM docker.io/python:slim
|
||||
RUN bash -c 'mkdir /app;\
|
||||
python -m venv /venv\
|
||||
/venv/bin/pip install -r requirements-worker.txt'
|
||||
python -m venv /venv'
|
||||
COPY requirements-worker.txt /app/
|
||||
RUN /venv/bin/pip install -r requirements-worker.txt
|
||||
COPY wg_manager /app/wg_manager
|
||||
COPY wg_connection_manager_worker /app/wg_connection_manager_worker
|
||||
COPY requirements-worker.txt .env /app/
|
||||
COPY .env /app/
|
||||
WORKDIR /app
|
||||
CMD ["/venv/bin/celery","-A","wg_connection_manager_worker.tasks","worker","--loglevel=INFO"]
|
Loading…
Reference in a new issue