Skip to content
Snippets Groups Projects
Unverified Commit ea754538 authored by Varac's avatar Varac
Browse files

Lint and optimize Dockerfile with hadolint

parent 072dba5b
No related branches found
No related tags found
No related merge requests found
FROM python:3.11-slim
RUN apt-get update
RUN apt-get install -y gcc libffi-dev
## make a local directory
RUN mkdir /app
# set "app" as the working directory from which CMD, RUN, ADD references
WORKDIR /app
# copy requirements.txt to /app
ADD requirements.txt .
# pip install the local requirements.txt
RUN pip install -r requirements.txt
# now copy all the files in this directory to /app
COPY . .
# now copy all the files in this directory to /code
ADD . .
# hadolint ignore=DL3008
RUN apt-get update \
&& apt-get install --no-install-recommends -y gcc libffi-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& pip install --no-cache-dir -r requirements.txt
# Listen to port 80 at runtime
EXPOSE 5000
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment