From 791c2b634fed98f1f627cd44d4996cbef16061a0 Mon Sep 17 00:00:00 2001 From: Ed Carrel Date: Sat, 11 Feb 2023 13:01:59 -0800 Subject: [PATCH 1/2] wip --- Dockerfile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..2521a764d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +FROM gitpod/workspace-full + +ENV RETRIGGER=3 + +ENV BUILDKIT_VERSION=0.10.6 +ENV BUILDKIT_FILENAME=buildkit-v${BUILDKIT_VERSION}.linux-amd64.tar.gz + +USER root + +# Install dazzle, buildkit and pre-commit +RUN curl -sSL https://github.com/moby/buildkit/releases/download/v${BUILDKIT_VERSION}/${BUILDKIT_FILENAME} | tar -xvz -C /usr +RUN curl -sSL https://github.com/gitpod-io/dazzle/releases/download/v0.1.13/dazzle_0.1.13_Linux_x86_64.tar.gz | tar -xvz -C /usr/local/bin +RUN curl -sSL https://github.com/mvdan/sh/releases/download/v3.5.1/shfmt_v3.5.1_linux_amd64 -o /usr/bin/shfmt \ + && chmod +x /usr/bin/shfmt +RUN install-packages shellcheck \ + && pip3 install pre-commit +RUN curl -sSL https://github.com/mikefarah/yq/releases/download/v4.22.1/yq_linux_amd64 -o /usr/bin/yq && chmod +x /usr/bin/yq + +ADD . workspace-images/ +WORKDIR workspace-images From e5d3a198f46c39657feb4e45786e670b1db0dea5 Mon Sep 17 00:00:00 2001 From: Ed Carrel Date: Sun, 12 Feb 2023 20:57:10 -0800 Subject: [PATCH 2/2] [WIP] Allow images to be created outside of a GitPod environment --- Dockerfile | 9 +++++---- docker-compose.yml | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 4 deletions(-) create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile index 2521a764d..e95daa54c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM gitpod/workspace-full +FROM ecarrel/dazzle:upgrade_go_zipexec ENV RETRIGGER=3 @@ -7,13 +7,14 @@ ENV BUILDKIT_FILENAME=buildkit-v${BUILDKIT_VERSION}.linux-amd64.tar.gz USER root +RUN apk add curl bash + # Install dazzle, buildkit and pre-commit RUN curl -sSL https://github.com/moby/buildkit/releases/download/v${BUILDKIT_VERSION}/${BUILDKIT_FILENAME} | tar -xvz -C /usr -RUN curl -sSL https://github.com/gitpod-io/dazzle/releases/download/v0.1.13/dazzle_0.1.13_Linux_x86_64.tar.gz | tar -xvz -C /usr/local/bin RUN curl -sSL https://github.com/mvdan/sh/releases/download/v3.5.1/shfmt_v3.5.1_linux_amd64 -o /usr/bin/shfmt \ && chmod +x /usr/bin/shfmt -RUN install-packages shellcheck \ - && pip3 install pre-commit +# RUN install-packages shellcheck \ +# && pip3 install pre-commit RUN curl -sSL https://github.com/mikefarah/yq/releases/download/v4.22.1/yq_linux_amd64 -o /usr/bin/yq && chmod +x /usr/bin/yq ADD . workspace-images/ diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 000000000..f5d3a6a28 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,33 @@ +services: + buildkitd: + image: docker.io/moby/buildkit:latest + command: ["--addr", "tcp://0.0.0.0:1234"] + networks: + - "dazzle-net" + ports: + - "1234:1234" + + registry: + image: registry:2 + networks: + - "dazzle-net" + expose: + - "5000" + ports: + - "5000:5000" + + workspace-images: + image: workspace-images + depends_on: + - buildkitd + - registry + environment: + DAZZLE_BUILDKITD_ADDR=tcp://buildkitd:5000 + networks: + - "dazzle-net" + profiles: + - cmd + + +networks: + dazzle-net: {} \ No newline at end of file