Dockerfile: Separate cli follow-up#45697
Conversation
Don't show `error: No such remote: 'origin'` error when building for the first time and the cached git repository doesn't a remote yet. Signed-off-by: Paweł Gronowski <[email protected]>
Avoids invalidation of dev-systemd-true and dev-base when changing the CLI version/repository. Signed-off-by: Paweł Gronowski <[email protected]>
5e4bf96 to
0f9c8e6
Compare
| VOLUME /home/unprivilegeduser/.local/share/docker | ||
| COPY --link --from=dockercli /build/ /usr/local/cli | ||
| COPY --link --from=dockercli-integration /build/ /usr/local/cli-integration | ||
| # Wrap all commands in the "docker-in-docker" script to allow nested containers | ||
| ENTRYPOINT ["hack/dind"] |
There was a problem hiding this comment.
This one slightly confused me; we don't use the CLI in this stage, or is it always used as "parent" for another stage? (because we do set the ENTRYPOINT 🤔
There was a problem hiding this comment.
I don't think we use the CLI in this stage at all -- we can use it in the next stage which is closer to where it's needed, as I read it.
There was a problem hiding this comment.
This stage isn't used on its own - it's used as a parent of dev-systemd-false or as a parent for dev-base (if the SYSTEMD is false).
The entrypoint is set at this stage to be inherited by the dev-base depending on whether we want the systemd or not.
There was a problem hiding this comment.
The entrypoint is set at this stage to be inherited by the dev-base depending on whether we want the systemd or not.
Ah! That's the part I missed; yes, one uses this;
ENTRYPOINT ["hack/dind"]And the other uses
ENTRYPOINT ["hack/dind-systemd"]
A few small changes I didn't manage to push in time before the #45358 got merged 😄 🥷
hack/cli.sh: Quiet origin remove
Don't show
error: No such remote: 'origin'error when building for the first time and the cached git repository doesn't a remote yet.Dockerfile: Move dockercli to base-dev
Avoids invalidation of dev-systemd-true and dev-base when changing the CLI version/repository.
This saves around 30s on my machine.