devcontainers / devcontainers/ci

Unable to prebuild devcontainer image (error command docker tag)

Open
#271 7 comments 0 reactions 1 assignee Claimed by @chrmarti View on GitHub
bug info-needed
Dominant language
TypeScript
Stars
496
Forks
101
PR merge metrics
No merged PRs in 30d

Description

# Error
```
Error: Dev container build failed: Command failed: docker tag example_devcontainer_app ghcr.io/example/example-devcontainer:latest (exit code: undefined)
An error occurred building the container. Error: Command failed: docker tag example_devcontainer_app ghcr.io/example/example-devcontainer:latest
```

The error only occurs when trying to push the image, the simplest setup without `cacheFrom` and `push` works like a charm.

# Setup
```
.devcontainer/
├── devcontainer.json
├── docker-compose.yaml
└── Dockerfile
```

```yaml
build:
name: Build
runs-on: 16cores
steps:
- name: Checkout sources
uses: actions/checkout@v3

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Pre-build dev container image
uses: devcontainers/ci@v0.3
with:
imageName: ghcr.io/example/example-devcontainer
cacheFrom: ghcr.io/example/example-devcontainer
push: always
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.