Skip to content

Commit

Permalink
Minor tweaks to Dockerfile and Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
mesaugat committed Feb 11, 2024
1 parent 10b032a commit 26332bd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -56,3 +58,4 @@ jobs:
make test
- name: Stop database servers
run: docker-compose down
-
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 26332bd

Please sign in to comment.