Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@
!README.md
!docker-setup.sh
!docker-compose.yml
!test.sh
!test.sh
!build-images.sh

23 changes: 23 additions & 0 deletions build-images.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#! /bin/bash

if [ -z "$1" ]
then
echo "Error: need to provide tag for image"
echo "Usage: ./build-images.sh latest"
exit 1
fi


# create a custom builder to support multi-platform compiling
docker buildx create --name mybuilder

# set mybuilder as the new default, check the change effected
docker buildx use mybuilder
docker buildx inspect --bootstrap

# main build command: build and push images to DockerHub
docker buildx build . --platform=linux/amd64,linux/arm64/v8 -t cis548/595-docker-env:$1 --push

# build arm64 only for quick development. Uncomment the following line and comment out the main build command
# docker buildx build . --platform=linux/arm64/v8 -t cis548/595-project3-docker-env:$1 --push