Skip to content

Commit

Permalink
Docker fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jochenchrist committed Apr 1, 2024
1 parent b3ad2da commit 5813918
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
41 changes: 41 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,44 @@ jobs:
- name: Test with pytest
run: |
pytest
docker-test:
runs-on: ubuntu-latest
needs:
- test
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
datacontract/cli
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
# try to disable qemu
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
# linux/arm64 is disabled
# duckdb currently does not support linux_arm64_gcc4
# https://duckdb.org/docs/extensions/working_with_extensions#platforms
platforms: linux/amd64,linux/arm64
# push: ${{ github.event_name != 'pull_request' }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ENV PATH="/opt/venv/bin:$PATH"
WORKDIR /app
COPY pyproject.toml .
COPY datacontract/ datacontract/
RUN pip3 --no-cache-dir install .
RUN pip3 install --upgrade pip && pip3 --no-cache-dir install .
RUN python -c "import duckdb; duckdb.connect().sql(\"INSTALL httpfs\");"

FROM ubuntu:22.04 AS runner-image
Expand Down

0 comments on commit 5813918

Please sign in to comment.