-
Notifications
You must be signed in to change notification settings - Fork 48
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
Unable to prebuild devcontainer image (error command docker tag) #271
Comments
I have the same issue:
jobs:
publish-devcontainer:
name: Publish devcontainer
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
platforms: linux/amd64 # ,linux/arm64
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: devcontainers/[email protected]
with:
imageName: ghcr.io/${{ github.repository }}/devcontainer
cacheFrom: ghcr.io/${{ github.repository }}/devcontainer
imageTag: latest
platform: linux/amd64 # ,linux/arm64
configFile: .devcontainer/devcontainer.build.json
push: always |
Maybe a duplicate? #191 |
Fixed in the Dev Containers CLI 0.57.0. The CI action will automatically pick up that version. |
This error still happens for me
|
Looking at the code, this might still occur when you are using a devcontainer.json with an image and no features or with a Docker Compose configuration. @mintuhouse Could you append your devcontainer.json? |
We use docker compose // For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-docker-compose
{
"name": "ML AI (Rhythms)",
"initializeCommand": "${localWorkspaceFolder}/.devcontainer/hostsetup",
// Update the 'dockerComposeFile' list if you have more compose files or use different names.
// The .devcontainer/docker-compose.yml file contains any overrides you need/want to make.
"dockerComposeFile": [
"../../mlai/docker-compose.yml",
"docker-compose.extend.yml"
],
// The 'service' property is the name of the service for the container that VS Code should
// use. Update this value and .devcontainer/docker-compose.yml to the real service name.
"service": "mlai",
// The optional 'workspaceFolder' property is the path VS Code should open by default when
// connected. This is typically a file mount in .devcontainer/docker-compose.yml
"workspaceFolder": "/workspaces/rhythms/mlai",
// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
// "azure-cli": "latest",
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {
"moby": true,
"installDockerBuildx": true,
"version": "latest",
"dockerDashComposeVersion": "v2"
},
// "ghcr.io/devcontainers-contrib/features/actions-runner:1": {
// "version": "latest",
// "dotnetVersion": "latest"
// },
// "ghcr.io/devcontainers/features/github-cli:1": {
// "version": "latest"
// },
"ghcr.io/devcontainers-contrib/features/apt-get-packages:1": {
"preserve_apt_list": false,
"packages": "htop",
"ppas": ""
},
"ghcr.io/devcontainers-contrib/features/zsh-plugins:0": {
"plugins": "git git-extras git-prompt direnv",
"omzPlugins": "https://github.com/zsh-users/zsh-autosuggestions"
},
// "ghcr.io/devcontainers/features/dotnet:2": {},
"ghcr.io/devcontainers-contrib/features/localtunnel-npm:1": {}
},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [],
"otherPortsAttributes": {
// Prevent auto-forwarding of ports
"onAutoForward": "ignore"
},
// Uncomment the next line if you want start specific services in your Docker Compose config.
// "runServices": [],
// Uncomment the next line if you want to keep your containers running after VS Code shuts down.
// "shutdownAction": "none",
// Run commands after the container is created.
"postCreateCommand": "/workspaces/rhythms/mlai/bin/devcontainer-setup",
// Executes every time the container starts
// "postStartCommand": "bash -i post-start.sh",
// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
"settings": {
"terminal.integrated.defaultProfile.linux": "zsh",
"terminal.integrated.profiles.linux": {
"zsh": {
"path": "/usr/bin/zsh"
}
}
},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"streetsidesoftware.code-spell-checker",
"bierner.github-markdown-preview",
"ms-azuretools.vscode-docker",
"eamodio.gitlens",
"GitHub.copilot",
"GitHub.vscode-pull-request-github",
"esbenp.prettier-vscode",
"foxundermoon.shell-format",
"redhat.vscode-yaml",
"github.vscode-github-actions",
"Postman.postman-for-vscode",
"yokawasa.jwt-debugger",
"ms-python.python",
"charliermarsh.ruff",
"njpwerner.autodocstring",
"tamasfe.even-better-toml",
"ms-toolsai.jupyter",
"ms-toolsai.datawrangler",
"ms-toolsai.vscode-ai",
"ms-toolsai.vscode-ai-remote",
"ms-toolsai.vscode-jupyter-powertoys"
]
}
},
// Uncomment to connect as an existing user other than the container default. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "devcontainer"
"remoteEnv": {
"CI": "${localEnv:CI}",
"PATH": "${containerEnv:PATH}:/some/other/path"
}
} |
Error
The error only occurs when trying to push the image, the simplest setup without
cacheFrom
andpush
works like a charm.Setup
The text was updated successfully, but these errors were encountered: