aboutsummaryrefslogtreecommitdiff
path: root/.docker/dockerfile-common.sh
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <jarred@jarredsumner.com> 2021-12-26 01:40:37 -0800
committerGravatar GitHub <noreply@github.com> 2021-12-26 01:40:37 -0800
commit536d6ab302d537af2627f4837ec9ad0b5337dbf2 (patch)
tree48122eb3c00bd81745efb7144d6a8b2e44a6a23f /.docker/dockerfile-common.sh
parent99446ffa8a434ae1609898de529620c91aef7f68 (diff)
downloadbun-536d6ab302d537af2627f4837ec9ad0b5337dbf2.tar.gz
bun-536d6ab302d537af2627f4837ec9ad0b5337dbf2.tar.zst
bun-536d6ab302d537af2627f4837ec9ad0b5337dbf2.zip
github actions (#91)
* Update bun.yml * Update bun.yml * Update bun.yml * Update bun.yml * Update Dockerfile * switch * :hushed: * Update bun.yml * Update Dockerfile * Update Dockerfile * wip * Update bun.yml * Update bun.yml * Update bun.yml * Update Dockerfile * Update Dockerfile * Update Dockerfile * Update Dockerfile * Update Dockerfile * Update Dockerfile * Update Dockerfile * cache is broken * Update bun.yml * Update bun.yml * Update bun.yml * Update bun.yml * Update bun.yml * Update Dockerfile * Update Dockerfile * Update Dockerfile * Update bun.yml * Update Dockerfile * Update Dockerfile * Update Dockerfile * Update bun.yml * Update Dockerfile * Update Dockerfile * Update bun.yml * bust it * Update Dockerfile * jm * Update bun.yml * Update bun.yml * Update bun.yml * Update bun.yml * Update Dockerfile * Update bun.yml * Update bun.yml * Update bun.yml * Update bun.yml * wip * Update bun.yml * Update Dockerfile * Update Dockerfile * Update Makefile * Update Dockerfile * Update Dockerfile * Update Dockerfile * Update Dockerfile * Update Dockerfile * Update Dockerfile * Update Dockerfile * pass executablePath * alright * Update Makefile * Update Dockerfile * Update Dockerfile * Update Makefile * Update Makefile * Update Dockerfile * lets try that * Update Dockerfile * Update bun.yml * hm * Update Dockerfile * Update Dockerfile * Update Dockerfile * not interactive * Update bun.yml * Update bun.yml * Update bun.yml * Update bun.yml * Update bun.yml * Update bun.yml * Update bun.yml * Update bun.yml * Update bun.yml * simplify this * Update bun.yml * Update bun.yml * Update bun.yml * Update bun.yml * Update bun.yml * Update bun.yml * Update bun.yml * missing * Update Dockerfile * Update Dockerfile * wrong dir * Update Dockerfile * Update bun.yml * Update Dockerfile * Update Dockerfile * Update bun.yml * ordering * Update Dockerfile * Update bun.yml * run-test file * pass github workspace * hm * Update bun.yml * copy the file * Update run-test.sh * Update bun.yml * Update bun.yml * Update bun.yml * try this way * Update bun.yml * maybe? * Update bun.yml * maybe taht's it? * maybe this * cache * up * Update bun.yml * Update bun.yml * try this one i guess * okay that might do it * Update Dockerfile * Update bun.yml * Update bun.yml * Update bun.yml * Update bun.yml * Update chrome.json * Update chrome.json * Update bun.yml * Update bun.yml * Update bun.yml * Update bun.yml * Update bun.yml * hm * Update bun.yml * Update bun.yml * Update bun.yml * Update bun.yml * Update bun.yml * fix caching I think * Update bun.yml * Update bun.yml * Update bun.yml * Update bun.yml * Update bun.yml * maybe * Update bun.yml * fixup * Update bun.yml * Update bun.yml * Update bun.yml * maybe this time * Update bun.yml * Update Dockerfile * random name * ok * explicit runner * Update bun.yml * Update bun.yml * try deleting the files so the layer caching doesn't happen * :runner: * Update bun.yml * Update bun.yml * Update Dockerfile * Update Dockerfile * Update Dockerfile * Dockerfile.base * node.js * Update bun.yml * Update Dockerfile * Update Dockerfile.base * cleanup
Diffstat (limited to '.docker/dockerfile-common.sh')
-rw-r--r--.docker/dockerfile-common.sh34
1 files changed, 34 insertions, 0 deletions
diff --git a/.docker/dockerfile-common.sh b/.docker/dockerfile-common.sh
new file mode 100644
index 000000000..c9c1a4efa
--- /dev/null
+++ b/.docker/dockerfile-common.sh
@@ -0,0 +1,34 @@
+export DOCKER_BUILDKIT=1
+
+export BUILDKIT_ARCH=$(uname -m)
+export ARCH=${BUILDKIT_ARCH}
+
+if [ "$BUILDKIT_ARCH" == "amd64" ]; then
+ export BUILDKIT_ARCH="amd64"
+ export ARCH=x64
+fi
+
+if [ "$BUILDKIT_ARCH" == "x86_64" ]; then
+ export BUILDKIT_ARCH="amd64"
+ export ARCH=x64
+fi
+
+if [ "$BUILDKIT_ARCH" == "arm64" ]; then
+ export BUILDKIT_ARCH="arm64"
+ export ARCH=aarch64
+fi
+
+if [ "$BUILDKIT_ARCH" == "aarch64" ]; then
+ export BUILDKIT_ARCH="arm64"
+ export ARCH=aarch64
+fi
+
+if [ "$BUILDKIT_ARCH" == "armv7l" ]; then
+ echo "Unsupported platform: $BUILDKIT_ARCH"
+ exit 1
+fi
+
+export BUILD_ID=$(cat build-id)
+export CONTAINER_NAME=bun-linux-$ARCH
+export DEBUG_CONTAINER_NAME=debug-bun-linux-$ARCH
+export TEMP=/tmp/bun-0.0.$BUILD_ID