Skip to content

Commit

Permalink
[SC-30890] Update README on how to test locally
Browse files Browse the repository at this point in the history
Adds instructions on how to test locally, and adds an option to
`./build-image` for building locally.
  • Loading branch information
onslaughtq committed Aug 8, 2023
1 parent a9f528f commit 01ca28f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 23 deletions.
25 changes: 2 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,11 @@
This repository has a workflow defined that will build and push amd64 and arm64
images to Github Container Registry.

# How to build this using docker
# How to build and test locally

* Use `./build-image.sh push-arch-tag` on your machine to build a local image
* Use `./build-image.sh build-local` on your machine to build a local image
for testing. As you make changes locally the images will be tagged with
`-uncommitted` on the end rather than the commit SHA.

* Update the base tag in `./build-image.sh` as necessary to reflect changes
in the base image or GHC version included in the image.

* On an AMD64 machine:

```
./build-image.sh build-arch-tag
./build-image.sh push-arch-tag
```

* On an ARM64 machine:

```
./build-image.sh build-arch-tag
./build-image.sh push-arch-tag
```

* On either machine:

```
./build-image.sh push-manifest
```

4 changes: 4 additions & 0 deletions build-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ esac
COMMAND=$1

case $COMMAND in
build-local)
echo "Building $ARCH_TAG"
docker build -t $ARCH_TAG .
;;
build-and-push-arch-tag)
echo "Building $ARCH_TAG"
docker buildx build . \
Expand Down

0 comments on commit 01ca28f

Please sign in to comment.