Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable building of images outside of GitPod! #1038

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
[WIP] Allow images to be created outside of a GitPod environment
  • Loading branch information
azanar committed Feb 13, 2023
commit e5d3a198f46c39657feb4e45786e670b1db0dea5
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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/
33 changes: 33 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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: {}