Skip to content

Fix packages incompatibility with Apple M1 by defaulting to linux/amd64 containers #1080

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Feb 13, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion dev/local/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,14 @@ web:

@# Build the web_epidata image
@cd repos/delphi/delphi-epidata;\
docker build -t delphi_web_epidata -f ./devops/Dockerfile .;\
docker build -t delphi_web_epidata\
--platform linux/amd64\
-f ./devops/Dockerfile .;\
cd -

@# Run the web server
@docker run --rm -p 127.0.0.1:10080:80 \
--platform linux/amd64\
--env "SQLALCHEMY_DATABASE_URI=$(sqlalchemy_uri)" \
--env "FLASK_SECRET=abc" --env "FLASK_PREFIX=/epidata" --env "LOG_DEBUG" \
--network delphi-net --name delphi_web_epidata \
Expand All @@ -102,10 +105,12 @@ db:

@# Build the database_epidata image
@docker build -t delphi_database_epidata \
--platform linux/amd64\
-f repos/delphi/delphi-epidata/dev/docker/database/epidata/Dockerfile .

@# Run the database
@docker run --rm -p 127.0.0.1:13306:3306 \
--platform linux/amd64\
--network delphi-net --name delphi_database_epidata \
--cap-add=sys_nice \
delphi_database_epidata >$(LOG_DB) 2>&1 &
Expand All @@ -120,6 +125,7 @@ db:
.PHONY=py
py:
@docker build -t delphi_web_python \
--platform linux/amd64\
-f repos/delphi/delphi-epidata/dev/docker/python/Dockerfile .

.PHONY=all
Expand All @@ -128,6 +134,7 @@ all: db web py
.PHONY=test
test:
@docker run -i --rm --network delphi-net \
--platform linux/amd64\
--mount type=bind,source=$(CWD)repos/delphi/delphi-epidata,target=/usr/src/app/repos/delphi/delphi-epidata,readonly \
--mount type=bind,source=$(CWD)repos/delphi/delphi-epidata/src,target=/usr/src/app/delphi/epidata,readonly \
--env "SQLALCHEMY_DATABASE_URI=$(sqlalchemy_uri)" \
Expand All @@ -137,6 +144,7 @@ test:
.PHONY=bash
bash:
@docker run -it --rm --network delphi-net \
--platform linux/amd64\
--mount type=bind,source=$(CWD)repos/delphi/delphi-epidata,target=/usr/src/app/repos/delphi/delphi-epidata,readonly \
--mount type=bind,source=$(CWD)repos/delphi/delphi-epidata/src,target=/usr/src/app/delphi/epidata,readonly \
--env "SQLALCHEMY_DATABASE_URI=$(sqlalchemy_uri)" \
Expand Down