Skip to content

Commit

Permalink
added docker build context for using specific docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
matusso committed Dec 8, 2024
1 parent 14484e8 commit 5a75ae0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ghauri.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ jobs:
- name: Build and push Docker image
run: |
docker buildx build --push \
--build-arg "PYTHON_VERSION=${{ env.PYTHON_VERSION }}" --build-arg "RELEASE_VERSION=${{ env.RELEASE_VERSION }}" \
docker buildx build --push --build-context python=docker-image://python:${{ env.PYTHON_VERSION }}-alpine \
--build-arg "RELEASE_VERSION=${{ env.RELEASE_VERSION }}" \
--tag ghcr.io/${{ github.repository_owner }}/ghauri:${{ env.RELEASE_VERSION }} \
--tag ghcr.io/${{ github.repository_owner }}/ghauri:latest \
--platform linux/amd64,linux/arm64 ./files/ghauri
Expand Down
8 changes: 3 additions & 5 deletions files/ghauri/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
ARG PYTHON_VERSION="${PYTHON_VERSION}" \
RELEASE_VERSION="${RELEASE_VERSION}"
FROM python

FROM python:"${PYTHON_VERSION}-alpine"
ARG RELEASE_VERSION="${RELEASE_VERSION}"

ENV PYTHON_VERSION=${PYTHON_VERSION} \
RELEASE_VERSION=${RELEASE_VERSION}
ENV RELEASE_VERSION=${RELEASE_VERSION}
# Install git
RUN apk update && apk add --no-cache git

Expand Down

0 comments on commit 5a75ae0

Please sign in to comment.