-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
removed unused commands from dockerfile
- Loading branch information
1 parent
b2923a7
commit 2c6fdc6
Showing
1 changed file
with
26 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,31 @@ | ||
FROM python:3.8.14 | ||
ARG PYTHON_VERSION=3.11-rc-bullseye | ||
FROM python:${PYTHON_VERSION} as python | ||
FROM python as builder | ||
|
||
RUN apt-get update && apt-get install --no-install-recommends -y \ | ||
build-essential \ | ||
default-libmysqlclient-dev | ||
|
||
ARG BUILD_ENVIRONMENT=local | ||
|
||
COPY ./requirements /requirements | ||
RUN pip wheel --wheel-dir /usr/src/app/wheels \ | ||
-r "/requirements/${BUILD_ENVIRONMENT}.txt" | ||
|
||
FROM python as runner | ||
|
||
ARG APP_HOME=/code | ||
WORKDIR ${APP_HOME} | ||
|
||
ENV PYTHONUNBUFFERED 1 | ||
ENV PYTHONDONTWRITEBYTECODE 1 | ||
ENV TZ="Europe/Istanbul" | ||
|
||
COPY --from=builder /usr/src/app/wheels /wheels/ | ||
|
||
RUN mkdir /code | ||
WORKDIR /code | ||
RUN pip install --no-cache-dir --no-index --find-links=/wheels/ /wheels/* \ | ||
&& rm -rf /wheels/ | ||
|
||
COPY requirements.txt /code/ | ||
RUN pip install -r requirements.txt | ||
COPY --chown=django:django . ${APP_HOME} | ||
|
||
COPY . /code/ | ||
USER django |