Skip to content
This repository has been archived by the owner on Aug 9, 2024. It is now read-only.

Commit

Permalink
fix dockerfile build
Browse files Browse the repository at this point in the history
Fixes #25
  • Loading branch information
ReenigneArcher committed Oct 8, 2022
1 parent 3c1c657 commit 1f2874f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
- name: Lint Dockerfile
uses: actions/checkout@v3

- uses: hadolint/[email protected]
- uses: hadolint/hadolint-action@v2.0.0 # 2.1.0 sometimes errors without any output
with:
dockerfile: ./Dockerfile

Expand Down
24 changes: 17 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# buildstage
FROM python:2.7.18-alpine3.11 as buildstage
FROM python:2.7.18-slim-buster as buildstage

# build args
ARG BUILD_VERSION
Expand All @@ -15,12 +15,22 @@ WORKDIR /build/
# copy repo
COPY . .

RUN python # update pip \
-m pip --no-python-version-warning --disable-pip-version-check install --upgrade pip==20.3.4 setuptools \
&& python -m pip install --upgrade -r requirements-dev.txt # install dev requirements \
&& python ./scripts/install_requirements.py # install plugin requirements \
&& python ./scripts/build_plist.py # build plist \
&& rm -r ./scripts/ # remove scripts dir
RUN \
# update Alpine packages
apt-get update && apt-get -y install \
# install git -> required for pip to install from git
git=1:2.20.1* \
&& rm -rf /var/lib/apt/lists/* \
# update python/pip
&& python -m pip --no-python-version-warning --disable-pip-version-check install --upgrade pip==20.3.4 setuptools \
# install build requirements
&& python -m pip install --upgrade -r requirements-dev.txt \
# install plugin requirements
&& python ./scripts/install_requirements.py \
# build plist file
&& python ./scripts/build_plist.py \
# remove scripts directory
&& rm -rf ./scripts/

# single layer deployed image
FROM scratch
Expand Down

0 comments on commit 1f2874f

Please sign in to comment.