diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eed28e0..b803b84 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,6 +46,8 @@ jobs: platforms: ${{ matrix.platform }} labels: ${{ steps.meta.outputs.labels }} outputs: type=docker,name=${{ env.REGISTRY_IMAGE }},name-canonical=true,push=false + - name: List docker image + run: docker image ls ${{ env.REGISTRY_IMAGE }} - name: Start database servers run: | docker-compose up -d @@ -56,3 +58,4 @@ jobs: make test - name: Stop database servers run: docker-compose down + - diff --git a/Dockerfile b/Dockerfile index 5016aa4..4173329 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # STAGE: main # ----------- # The main image that is published. -FROM python:3.11-slim-bookworm AS main +FROM python:3.11.8-slim-bookworm AS main ARG TARGETPLATFORM @@ -27,6 +27,7 @@ RUN \ myodbc-installer -a -d -n "MySQL ODBC 8.3 Unicode Driver" -t "Driver=/usr/local/lib/libmyodbc8w.so" && \ myodbc-installer -a -d -n "MySQL ODBC 8.3 ANSI Driver" -t "Driver=/usr/local/lib/libmyodbc8a.so" && \ myodbc-installer -d -l && \ + rm -rf mysql_connector* && \ # Install ODBC Driver for SQL Server and PostgreSQL ACCEPT_EULA='Y' apt-get install -y msodbcsql18 odbc-postgresql && \ # Install dependencies (pyobdc) diff --git a/Makefile b/Makefile index eedaf69..e4a0902 100644 --- a/Makefile +++ b/Makefile @@ -6,8 +6,8 @@ clean: @find . -name '*.pyc' -delete build: - @docker build --target=base -t $(IMAGE_NAME) . - @docker build --target=test -t $(IMAGE_NAME):test . + @docker buildx build --target=main -t $(IMAGE_NAME) . + @docker buildx build --target=test -t $(IMAGE_NAME):test . test: @docker run --env-file=./.env.test --network=host $(IMAGE_NAME):test