Sfoglia il codice sorgente

Dockerfile: rename dev stages

Also remove DEV_IMAGE bake var that is not used

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
CrazyMax 2 anni fa
parent
commit
b565b496ba
3 ha cambiato i file con 6 aggiunte e 9 eliminazioni
  1. 2 2
      Dockerfile
  2. 2 2
      Makefile
  3. 2 5
      docker-bake.hcl

+ 2 - 2
Dockerfile

@@ -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 . .

+ 2 - 2
Makefile

@@ -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)" .

+ 2 - 5
docker-bake.hcl

@@ -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"]
 }