diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 2d03641c..be122dcd 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -11,6 +11,9 @@ "containerEnv": { "GITHUB_API_TOKEN": "${localEnv:GITHUB_API_TOKEN}" }, + "features": { + "ghcr.io/devcontainers/features/docker-in-docker:2.3.0": {} + }, "customizations": { "vscode": { // Set *default* container specific settings.json values on container create. diff --git a/.github/scripts/deploy_image_from_artifact.sh b/.github/scripts/deploy_image_from_artifact.sh index 1f94245a..8a1f5788 100755 --- a/.github/scripts/deploy_image_from_artifact.sh +++ b/.github/scripts/deploy_image_from_artifact.sh @@ -27,12 +27,6 @@ HELM_CONFIG_DIR="$HOME/.velocitas/packages/devenv-runtimes/$RUNTIME_VERSION/runt local_tag="$APP_REGISTRY/$APP_NAME_LOWERCASE:local" echo "Local URL: $local_tag" -echo "Print content of tar" - -tar -ztvf $APP_ARTIFACT_NAME.tar - -echo "Load tar file" - docker load -i "$APP_ARTIFACT_NAME.tar" | sed -n 's/^Loaded image ID: sha256:\([0-9a-f]*\).*/\1/p' | xargs -i docker tag {} $local_tag docker push $local_tag diff --git a/.github/workflows/build-docker-image.yml b/.github/workflows/build-docker-image.yml index 9a772db5..93b7cee3 100644 --- a/.github/workflows/build-docker-image.yml +++ b/.github/workflows/build-docker-image.yml @@ -52,6 +52,26 @@ jobs: with: submodules: "recursive" + - name: Check Docker Version + run: docker version + - name: Install Latest Docker + run: | + sudo apt-get update + sudo apt-get install ca-certificates curl gnupg + sudo install -m 0755 -d /etc/apt/keyrings + curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg + sudo chmod a+r /etc/apt/keyrings/docker.gpg + echo \ + "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \ + "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \ + sudo tee /etc/apt/sources.list.d/docker.list > /dev/null + sudo apt-get update + VERSION_STRING=5:23.0.6-1~ubuntu.22.04~jammy + sudo apt-get install -y docker-ce=$VERSION_STRING docker-ce-cli=$VERSION_STRING containerd.io docker-buildx-plugin docker-compose-plugin + + - name: Check Docker Version + run: docker version + - name: Clone Release Documentation Action repository uses: actions/checkout@v3 with: @@ -64,7 +84,7 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 with: - version: v0.9.0 + version: v0.11.2 - id: github-repository-name-case-adjusted name: Prepare repository name in lower case for docker upload. This supports repository names in mixed case @@ -85,6 +105,7 @@ jobs: run: | git config --global user.email "github-automation@users.noreply.github.com" git config --global user.name "Github Automation" + git config --global --add safe.directory $( pwd ) - name: Set Platform(s) String id: set_platforms @@ -115,6 +136,11 @@ jobs: labels: | org.opencontainers.image.source=https://github.com/${{steps.github-repository-name-case-adjusted.outputs.lowercase}} + - name: Test docker load + run: | + tar -tvf "./${{ matrix.component.name }}.tar" + docker load -i "./${{ matrix.component.name }}.tar" + - name: "Install skopeo" run: | sudo apt-get update