Dockerfile: rename dev stages

Also remove DEV_IMAGE bake var that is not used

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax 2022-12-26 17:55:57 +01:00
parent 27ba1766e7
commit b565b496ba
No known key found for this signature in database
GPG key ID: 3248E46B6BB8C7F7
3 changed files with 6 additions and 9 deletions

View file

@ -476,7 +476,7 @@ RUN --mount=type=cache,sharing=locked,id=moby-dev-aptlib,target=/var/lib/apt \
systemd-sysv
ENTRYPOINT ["hack/dind-systemd"]
FROM dev-systemd-${SYSTEMD} AS dev
FROM dev-systemd-${SYSTEMD} AS dev-base
ARG DEBIAN_FRONTEND
RUN groupadd -r docker
RUN useradd --create-home --gid docker unprivilegeduser \
@ -600,5 +600,5 @@ COPY --from=build /build/ /
# usage:
# > make shell
# > SYSTEMD=true make shell
FROM dev AS final
FROM dev-base AS dev
COPY . .

View file

@ -179,9 +179,9 @@ run: build ## run the docker daemon in a container
.PHONY: build
ifeq ($(BIND_DIR), .)
build: shell_target := --target=dev
build: shell_target := --target=dev-base
else
build: shell_target := --target=final
build: shell_target := --target=dev
endif
build: bundles
$(BUILD_CMD) $(BUILD_OPTS) $(shell_target) --load -t "$(DOCKER_IMAGE)" .

View file

@ -128,19 +128,16 @@ target "binary-cross" {
# dev
#
variable "DEV_IMAGE" {
default = "docker-dev"
}
variable "SYSTEMD" {
default = "false"
}
target "dev" {
inherits = ["_common"]
target = "final"
target = "dev"
args = {
SYSTEMD = SYSTEMD
}
tags = [DEV_IMAGE]
tags = ["docker-dev"]
output = ["type=docker"]
}