GoogleContainerTools / GoogleContainerTools/skaffold

No child with platform linux/amd64 in index openjdk:8u312-nanoserver-1809

Open
#6,902 3 comments 0 reactions 0 assignees View on GitHub
area/build kind/feature-request planning/H1-2022 platform/linux platform/windows priority/p2
Dominant language
Go
Stars
15.9k
Forks
1.7k
Avg merge
3d 9h
Merged PRs (30d)
10

Description

### Expected behavior

Building Windows container image on Linux (using `DOCKER_HOST`) succeeds.

### Actual behavior

```
# DOCKER_HOST=tcp://windows.host:2375 skaffold build -p build-only --default-repo=foo.bar
Generating tags...
- cli-tools/openjdk -> foo.bar/cli-tools_openjdk:ef75757-ltsc2019
Checking cache...
- cli-tools/openjdk: Error checking cache.
getting hash for artifact "cli-tools/openjdk": getting dependencies for "cli-tools/openjdk": parsing ONBUILD instructions: retrieving image "openjdk:8u312-nanoserver-1809": no child with platform linux/amd64 in index openjdk:8u312-nanoserver-1809
```

### Information

- Skaffold version: 1.29.0, 1.35.0
- Operating system: Linux (alpine:3.13.6)
- Installed via: curl from https://storage.googleapis.com/skaffold/releases/v${SKAFFOLD_VERSION}/skaffold-linux-amd64
- Contents of skaffold.yaml:

```yaml
apiVersion: skaffold/v2beta20
kind: Config
build:
artifacts:
- image: cli-tools/openjdk
context: cli-tools/openjdk
tagPolicy:
customTemplate:
template: "{{.COMMIT}}-ltsc2019"
components:
- name: COMMIT
gitCommit: {}
profiles:
- name: build-only
build:
local:
push: false
```

- Contents of Dockerfile:

```dockerfile
FROM openjdk:8u312-nanoserver-1809
```

### Steps to reproduce the behavior

See above.

Current workaround:

```yaml
apiVersion: skaffold/v2beta20
kind: Config
build:
artifacts:
- image: bases/openjdk
custom:
buildCommand: docker pull openjdk:8u312-nanoserver-1809 && docker tag openjdk:8u312-nanoserver-1809 $IMAGE
- image: cli-tools/openjdk
context: cli-tools/openjdk
requires:
- image: bases/openjdk
alias: BASE
tagPolicy:
customTemplate:
template: "{{.COMMIT}}-ltsc2019"
components:
- name: COMMIT
gitCommit: {}
profiles:
- name: build-only
build:
local:
push: false
```

```dockerfile
ARG BASE
FROM ${BASE}
```

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.