diff --git a/.github/.devcontainer/Dockerfile b/.github/.devcontainer/Dockerfile new file mode 100644 index 0000000000..88cae803d3 --- /dev/null +++ b/.github/.devcontainer/Dockerfile @@ -0,0 +1 @@ +FROM mcr.microsoft.com/devcontainers/base:ubuntu diff --git a/.github/.devcontainer/devcontainer.json b/.github/.devcontainer/devcontainer.json index aee8286aa1..05aac8fba6 100644 --- a/.github/.devcontainer/devcontainer.json +++ b/.github/.devcontainer/devcontainer.json @@ -3,14 +3,16 @@ { "name": "neosync", // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile - // "image": "mcr.microsoft.com/devcontainers/go:1-1.21-bullseye", - "image": "mcr.microsoft.com/devcontainers/base:ubuntu", - + // See: https://github.com/devcontainers/ci/issues/191#issuecomment-1473518609 + // Due to multi-platform builds docker tag fails, this is a workaround + "build": { + "dockerfile": "./Dockerfile", + "context": "." + }, // Features to add to the dev container. More info: https://containers.dev/features. "features": { /* Docker */ "ghcr.io/devcontainers/features/docker-in-docker:2": {}, - /* K8s */ "ghcr.io/mpriscella/features/kind:1": {}, "ghcr.io/lentzi90/features/tilt:0": {}, @@ -27,34 +29,25 @@ "version": "5.1.1" // https://github.com/rio/features/issues/37 }, "ghcr.io/nucleuscloud/devcontainer-features/helmfile:0": {}, - /* Protobuf */ "ghcr.io/marcozac/devcontainer-features/buf:1": {}, "ghcr.io/devcontainers-contrib/features/grpcurl-asdf:2": {}, - /* Golang */ "ghcr.io/devcontainers/features/go:1": {}, "ghcr.io/guiyomh/features/golangci-lint:0": {}, "ghcr.io/nucleuscloud/devcontainer-features/sqlc:1": {}, - /* NodeJS/Browser */ "ghcr.io/devcontainers/features/node:1": {}, - /* Temporal */ "ghcr.io/devcontainers-contrib/features/temporal-cli:1": {} - // todo: benthos } - // Use 'forwardPorts' to make a list of ports inside the container available locally. // "forwardPorts": [], - // Use 'postCreateCommand' to run commands after the container is created. // "postCreateCommand": "go version", - // Configure tool-specific properties. // "customizations": {}, - // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. // "remoteUser": "root" } diff --git a/.github/workflows/devcontainer-release.yml b/.github/workflows/devcontainer-release.yml index 5de04dda62..ac7a122c50 100644 --- a/.github/workflows/devcontainer-release.yml +++ b/.github/workflows/devcontainer-release.yml @@ -37,6 +37,8 @@ jobs: - name: Set up QEMU uses: docker/setup-qemu-action@v3 + with: + platforms: linux/amd64,linux/arm64 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -50,6 +52,9 @@ jobs: - name: Build and release devcontainer Multi-Platform uses: devcontainers/ci@v0.3 + env: + # see: https://github.com/devcontainers/ci/issues/191#issuecomment-1603857155 + BUILDX_NO_DEFAULT_ATTESTATIONS: true with: imageName: ghcr.io/${{ github.repository }}/devcontainer imageTag: ${{ steps.dcmeta.outputs.tags }}