Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Dockerfile based on lint results #23

Merged
merged 1 commit into from
Nov 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM python:3.9-alpine AS virtualenv
WORKDIR /build
RUN apk add --no-cache --update python3-dev libffi-dev gcc musl-dev make g++ libmagic hiredis
RUN python -m pip install --upgrade pip \
&& python -m pip install --upgrade wheel \
RUN python -m pip install --no-cache-dir --upgrade pip \
&& python -m pip install --no-cache-dir --upgrade wheel \
&& python -m venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"
COPY requirements.txt .
RUN pip install -r requirements.txt
RUN pip install --no-cache-dir -r requirements.txt

FROM python:3.9-alpine AS base
WORKDIR /muistot
Expand Down Expand Up @@ -34,7 +34,7 @@ COPY pytest.ini .
COPY .coveragerc .
COPY requirements-dev.txt .
COPY requirements.txt .
RUN pip install -r requirements-dev.txt
RUN pip install --no-cache-dir -r requirements-dev.txt
COPY src src
RUN ls && pip install --no-index ./src
CMD pytest
RUN ls && pip install --no-cache-dir --no-index ./src
CMD ["pytest"]
Loading