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

WITH DOCKER with multiple --load from same target doesn't load images properly #685

Closed
ohadravid opened this issue Jan 3, 2021 · 0 comments · Fixed by #687
Closed

WITH DOCKER with multiple --load from same target doesn't load images properly #685

ohadravid opened this issue Jan 3, 2021 · 0 comments · Fixed by #687
Assignees
Labels
type:bug Something isn't working

Comments

@ohadravid
Copy link

Hi!

I'm facing an issue when using WITH DOCKER with multiple images which are loaded from a target with the same name.

Running earthly -V -P +test (using earthly version v0.4.3) for the following Earthfile (in an empty folder):


docker:
    FROM ubuntu


test:
    FROM earthly/dind:alpine
    WITH DOCKER \
            --load a:latest=+docker \
            --load b:latest=+docker
        RUN docker images
    END

results in:

...
+test | --> WITH DOCKER (install deps)
+test | /usr/local/bin/dockerd
+test | Completed in 302.1184ms
+test | --> WITH DOCKER RUN docker images
+test | Loading images...
+test | Loaded image: a:latest
+test | Loaded image: a:latest
+test | ...done
+test | REPOSITORY   TAG       IMAGE ID       CREATED          SIZE
+test | a            latest    abe76754ebd5   51 minutes ago   72.9MB
+test | Completed in 4.4538029s
...

where the expected output should show both a and b images.

My workaround for now is this:


docker:
    FROM ubuntu

a:
    FROM +docker

b:
    FROM +docker

test:
    FROM earthly/dind:alpine
    WITH DOCKER \
            --load a:latest=+a \
            --load b:latest=+b 
        RUN docker images
    END

which seems to work as expected.

Thanks for this great tool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants