aboutsummaryrefslogtreecommitdiff
path: root/push-docker.sh
diff options
context:
space:
mode:
Diffstat (limited to 'push-docker.sh')
-rw-r--r--push-docker.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/push-docker.sh b/push-docker.sh
new file mode 100644
index 000000000..16d9640fd
--- /dev/null
+++ b/push-docker.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+source "dockerfile-common.sh"
+
+export CONTAINER_NAME=$CONTAINER_NAME
+
+docker build . --target build_release --progress=plain -t $CONTAINER_NAME:latest --build-arg BUILDKIT_INLINE_CACHE=1 --platform=linux/$BUILDKIT_ARCH --cache-from $CONTAINER_NAME:latest
+
+if (($?)); then
+ echo "Failed to build container"
+ exit 1
+fi
+
+id=$(docker create $CONTAINER_NAME:latest)
+if (($?)); then
+ echo "Failed to cp container"
+ exit 1
+fi
+
+REGISTRY="ghcr.io/jarred-sumner"
+docker push $REGISTRY/$CONTAINER_NAME:latest
+# docker push $ECR/$CONTAINER_NAME:$BUILD_ID