Skip to content

Commit

Permalink
ystack's y-deno is unmaintained so build runtime from official
Browse files Browse the repository at this point in the history
deno distroless image instead
  • Loading branch information
solsson committed Nov 28, 2024
1 parent 44afd45 commit dde805d
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 16 deletions.
45 changes: 44 additions & 1 deletion .github/workflows/images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ jobs:
crane cp curlimages/curl:$TAG_CURL ghcr.io/yolean/curl:$TAG_CURL
crane cp busybox:$TAG_BUSYBOX ghcr.io/yolean/busybox:$TAG_BUSYBOX
crane cp mailgun/kafka-pixy:0.17.0@sha256:0b5f4795c0b0d80729fa7415ec70ae4d411e152c6149656dddf01b18184792e0 ghcr.io/yolean/kafka-pixy:0.17.0
crane cp docker.io/yolean/runtime-deno:2c6e176109a4cb1850cb7f8fa56411d370e3f705@sha256:5aeb0b9191bb8c0f1f4b46fb4e9a03857d5b78007a1b960dcced9404dd368bc9 ghcr.io/yolean/runtime-deno:2c6e176109a4cb1850cb7f8fa56411d370e3f705
crane cp tinygo/tinygo:$TAG_TINYGO ghcr.io/yolean/tinygo:$TAG_TINYGO
-
name: Set up QEMU
Expand Down Expand Up @@ -291,6 +290,20 @@ jobs:
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
-
name: Build and push runtime-deno latest
uses: docker/build-push-action@v5
env:
SOURCE_DATE_EPOCH: 0
with:
context: runtime-deno
tags: |
ghcr.io/yolean/runtime-deno:latest
ghcr.io/yolean/runtime-deno:${{ github.sha }}
platforms: linux/amd64,linux/arm64/v8
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
-
name: Build and push java root
uses: docker/build-push-action@v5
Expand Down Expand Up @@ -542,6 +555,36 @@ jobs:
cache-to: type=gha,mode=max
build-contexts: |
yolean/runtime-quarkus-ubuntu:root=docker-image://ghcr.io/yolean/runtime-quarkus-ubuntu:root
-
name: Build and push runtime-quarkus-deno root
uses: docker/build-push-action@v5
env:
SOURCE_DATE_EPOCH: 0
with:
context: runtime-quarkus-deno
tags: |
ghcr.io/yolean/runtime-quarkus-deno:root
ghcr.io/yolean/runtime-quarkus-deno:${{ github.sha }}-root
platforms: linux/amd64,linux/arm64/v8
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
-
name: Build and push runtime-quarkus-deno latest
uses: docker/build-push-action@v5
env:
SOURCE_DATE_EPOCH: 0
with:
context: to-nonroot/runtime-quarkus-deno
tags: |
ghcr.io/yolean/runtime-quarkus-deno:latest
ghcr.io/yolean/runtime-quarkus-deno:${{ github.sha }}
platforms: linux/amd64,linux/arm64/v8
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
build-contexts: |
yolean/runtime-quarkus-deno:root=docker-image://ghcr.io/yolean/runtime-quarkus-deno:root
-
name: Build and push runtime-quarkus-ubuntu-jre root
uses: docker/build-push-action@v5
Expand Down
14 changes: 4 additions & 10 deletions runtime-deno/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
FROM yolean/builder-quarkus as libs

RUN y-deno -V
FROM denoland/deno:distroless-2.1.1@sha256:8c7fbba4e216e9535ac9869744ce36e225814aa3adc7754fdeb5930a2a86f34f AS deno

FROM --platform=$TARGETPLATFORM gcr.io/distroless/static-debian12:nonroot@sha256:d71f4b239be2d412017b798a0a401c44c3049a3ca454838473a4c32ed076bfea

COPY --from=libs \
/usr/lib/x86_64-linux-gnu/libgcc_s.so.* \
/usr/lib/x86_64-linux-gnu/

COPY --from=libs \
/usr/local/src/ystack/bin/deno /deno
COPY --from=deno \
/bin/deno /usr/local/bin/deno

ENTRYPOINT ["/deno"]
ENTRYPOINT ["/usr/local/bin/deno"]
CMD ["-V"]
8 changes: 3 additions & 5 deletions runtime-quarkus-deno/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
FROM yolean/builder-base as base

RUN y-deno -V
FROM yolean/runtime-deno AS runtime-deno

FROM yolean/runtime-quarkus-ubuntu

COPY --from=base \
/usr/local/src/ystack/bin/deno /usr/local/bin/deno
COPY --from=runtime-deno \
/usr/local/bin/deno /usr/local/bin/deno
2 changes: 2 additions & 0 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ blobs
headless-chrome
git-http-readonly
runtime-quarkus
runtime-deno
"

MULTIARCH_TONONROOT="
Expand All @@ -42,6 +43,7 @@ node-watchexec
node-kafka-watch
node-gcloud
runtime-quarkus-ubuntu
runtime-quarkus-deno
runtime-quarkus-ubuntu-jre
runtime-quarkus-dev
toil-storage
Expand Down

0 comments on commit dde805d

Please sign in to comment.