Skip to content
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

Fails to parse Dockerfile base image when using stages #86

Open
harrymilne opened this issue Feb 7, 2024 · 0 comments
Open

Fails to parse Dockerfile base image when using stages #86

harrymilne opened this issue Feb 7, 2024 · 0 comments

Comments

@harrymilne
Copy link

harrymilne commented Feb 7, 2024

Problem

When envbuilder tries to build a Dockerfile that uses FROM <image> AS <stage> notation envbuilder errors parsing the base image

EXAMPLE 1

Dockerfile:

FROM public.ecr.aws/docker/library/python:3.10-slim AS base

Envbuilder error:

error: compile devcontainer.json: parse image from dockerfile: parse image ref "public.ecr.aws/docker/library/python:3.10-slim AS base": could not parse reference: public.ecr.aws/docker/library/python:3.10-slim AS base

EXAMPLE 2

Dockerfile:

FROM public.ecr.aws/docker/library/rust:1.73-bullseye@sha256:fbc99ade5c476a8d602192a1bf8d50ae3361469c160d55a34379905ad4f82ae5 as base

Envbuilder error:

error: compile devcontainer.json: get user from image: fetch image index.docker.io/library/base:latest: GET https://index.docker.io/v2/library/base/manifests/latest: UNAUTHORIZED: authentication required; [map[Action:pull Class: Name:library/base Type:repository]]

Solution

Envbuilder should understand the FROM <image> AS <stage> notation

@bpmct bpmct added this to the envbuilder v1.0 milestone Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants