Skip to content

Commit

Permalink
Fix a couple of docker target problems (#1545)
Browse files Browse the repository at this point in the history
* Fix `make local-docker-image` after docker file rename

Should this target exist? Not sure. However, this target does exist,
is pulled in by the acceptance test target automatically, and it was
broken. So fix it.

What this target used to do differently from the default targets was
to tag the image with an internal name instead of a public one. Should
this distinction exist? Not sure. However, as both targets exist, I'll
restore the distinction, too.

* Fix which docker image needs to embed flux
  • Loading branch information
Robin Sonefors authored and jpellizzari committed Mar 3, 2022
1 parent 153575a commit aa2b125
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@ local-kind-cluster-with-registry:
local-registry:
./tools/deploy-local-registry.sh

local-docker-image:
DOCKER_BUILDKIT=1 docker build -t localhost:5001/wego-app:latest . --build-arg FLUX_VERSION=$(FLUX_VERSION)
docker push localhost:5001/wego-app:latest
local-docker-image: DOCKERFILE:=gitops-server.dockerfile
local-docker-image: DOCKERARGS:=--build-arg FLUX_VERSION=$(FLUX_VERSION)
local-docker-image: DOCKER_REGISTRY:=localhost:5001
local-docker-image: _docker

test: dependencies
go test -v ./core/...
Expand Down Expand Up @@ -77,7 +78,7 @@ endif
gitops: bin/gitops ## Build the Gitops CLI, accepts a 'DEBUG' flag
gitops-server: cmd/gitops-server/cmd/dist/index.html bin/gitops-server ## Build the Gitops UI server, accepts a 'DEBUG' flag

DOCKER_REGISTRY?=localhost:5001
DOCKER_REGISTRY?=ghcr.io/weaveworks/wego-app

_docker:
DOCKER_BUILDKIT=1 docker build $(DOCKERARGS)\
Expand All @@ -86,10 +87,10 @@ _docker:
.

docker-gitops: DOCKERFILE:=gitops.dockerfile
docker-gitops: DOCKERARGS:=--build-arg FLUX_VERSION=$(FLUX_VERSION)
docker-gitops: _docker ## Build a Docker image of the gitops CLI

docker-gitops-server: DOCKERFILE:=gitops-server.dockerfile
docker-gitops-server: DOCKERARGS:=--build-arg FLUX_VERSION=$(FLUX_VERSION)
docker-gitops-server: _docker ## Build a Docker image of the Gitops UI Server

# Clean up images and binaries
Expand Down

0 comments on commit aa2b125

Please sign in to comment.