-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Docker multi-arch images push for linux/amd64, linux/arm64 #32686
Changes from 14 commits
076adc2
1920517
0a2439d
df5702f
8cada85
cb965f3
3f5cc4c
3df5251
519c4a0
9d3e87f
428a712
17bc94f
5ad5bb5
8249bb9
f1eb67c
533b3c7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
# Do things in edx-platform | ||
.PHONY: base-requirements check-types clean \ | ||
compile-requirements detect_changed_source_translations dev-requirements \ | ||
docker_auth docker_build docker_push docker_tag docs extract_translations \ | ||
docker_auth docker_build docker_tag_build_push_lms docker_tag_build_push_lms_dev \ | ||
docker_tag_build_push_cms docker_tag_build_push_cms_dev docs extract_translations \ | ||
guides help lint-imports local-requirements migrate migrate-lms migrate-cms \ | ||
pre-requirements pull pull_translations push_translations requirements shell swagger \ | ||
technical-docs test-requirements ubuntu-requirements upgrade-package upgrade | ||
|
@@ -142,30 +143,26 @@ upgrade-package: ## update just one package to the latest usable release | |
check-types: ## run static type-checking tests | ||
mypy | ||
|
||
docker_build: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it possible to keep the separation between build and push steps? I can envision the need to iterate on the build process locally for development/debugging, without wanting to push the results up to Docker Hub. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. working on it. |
||
docker_auth: | ||
UsamaSadiq marked this conversation as resolved.
Show resolved
Hide resolved
|
||
echo "$$DOCKERHUB_PASSWORD" | docker login -u "$$DOCKERHUB_USERNAME" --password-stdin | ||
|
||
docker_build: docker_auth | ||
UsamaSadiq marked this conversation as resolved.
Show resolved
Hide resolved
|
||
DOCKER_BUILDKIT=1 docker build . --build-arg SERVICE_VARIANT=lms --build-arg SERVICE_PORT=8000 --target development -t openedx/lms-dev | ||
DOCKER_BUILDKIT=1 docker build . --build-arg SERVICE_VARIANT=lms --build-arg SERVICE_PORT=8000 --target production -t openedx/lms | ||
DOCKER_BUILDKIT=1 docker build . --build-arg SERVICE_VARIANT=cms --build-arg SERVICE_PORT=8010 --target development -t openedx/cms-dev | ||
DOCKER_BUILDKIT=1 docker build . --build-arg SERVICE_VARIANT=cms --build-arg SERVICE_PORT=8010 --target production -t openedx/cms | ||
|
||
docker_tag: docker_build | ||
docker tag openedx/lms openedx/lms:${GITHUB_SHA} | ||
docker tag openedx/lms-dev openedx/lms-dev:${GITHUB_SHA} | ||
docker tag openedx/cms openedx/cms:${GITHUB_SHA} | ||
docker tag openedx/cms-dev openedx/cms-dev:${GITHUB_SHA} | ||
docker_tag_build_push_lms: docker_auth | ||
docker buildx build -t openedx/lms:latest -t openedx/lms:${GITHUB_SHA} --platform linux/amd64,linux/arm64 --build-arg SERVICE_VARIANT=lms --build-arg SERVICE_PORT=8000 --target production --push . | ||
|
||
docker_auth: | ||
echo "$$DOCKERHUB_PASSWORD" | docker login -u "$$DOCKERHUB_USERNAME" --password-stdin | ||
docker_tag_build_push_lms_dev: docker_auth | ||
docker buildx build -t openedx/lms-dev:latest -t openedx/lms-dev:${GITHUB_SHA} --platform linux/amd64,linux/arm64 --build-arg SERVICE_VARIANT=lms --build-arg SERVICE_PORT=8000 --target development --push . | ||
|
||
docker_tag_build_push_cms: docker_auth | ||
docker buildx build -t openedx/cms:latest -t openedx/cms:${GITHUB_SHA} --platform linux/amd64,linux/arm64 --build-arg SERVICE_VARIANT=cms --build-arg SERVICE_PORT=8010 --target production --push . | ||
|
||
docker_push: docker_tag docker_auth ## push to docker hub | ||
docker push "openedx/lms:latest" | ||
docker push "openedx/lms:${GITHUB_SHA}" | ||
docker push "openedx/lms-dev:latest" | ||
docker push "openedx/lms-dev:${GITHUB_SHA}" | ||
docker push "openedx/cms:latest" | ||
docker push "openedx/cms:${GITHUB_SHA}" | ||
docker push "openedx/cms-dev:latest" | ||
docker push "openedx/cms-dev:${GITHUB_SHA}" | ||
docker_tag_build_push_cms_dev: docker_auth | ||
docker buildx build -t openedx/cms-dev:latest -t openedx/cms-dev:${GITHUB_SHA} --platform linux/amd64,linux/arm64 --build-arg SERVICE_VARIANT=cms --build-arg SERVICE_PORT=8010 --target development --push . | ||
|
||
lint-imports: | ||
lint-imports | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Accidental trailing whitespace?