Skip to content

Commit 946a3ab

Browse files
dudineanitishfy
andauthored
fix(ci): fix make image DEV_IMAGE=true on non-amd64 architecture (#25897) (#25898)
Signed-off-by: Eugene Doudine <eugene.doudine@octopus.com> Signed-off-by: dudinea <eugene.doudine@octopus.com> Co-authored-by: Nitish Kumar <justnitish06@gmail.com>
1 parent e682552 commit 946a3ab

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ ifeq ($(DEV_IMAGE), true)
349349
IMAGE_TAG="dev-$(shell git describe --always --dirty)"
350350
image: build-ui
351351
DOCKER_BUILDKIT=1 $(DOCKER) build --platform=$(TARGET_ARCH) -t argocd-base --target argocd-base .
352-
CGO_ENABLED=${CGO_FLAG} GOOS=linux GOARCH=amd64 GODEBUG="tarinsecurepath=0,zipinsecurepath=0" go build -v -ldflags '${LDFLAGS}' -o ${DIST_DIR}/argocd ./cmd
352+
GOOS=linux GOARCH=$(TARGET_ARCH:linux/%=%) GODEBUG="tarinsecurepath=0,zipinsecurepath=0" go build -v -ldflags '${LDFLAGS}' -o ${DIST_DIR}/argocd ./cmd
353353
ln -sfn ${DIST_DIR}/argocd ${DIST_DIR}/argocd-server
354354
ln -sfn ${DIST_DIR}/argocd ${DIST_DIR}/argocd-application-controller
355355
ln -sfn ${DIST_DIR}/argocd ${DIST_DIR}/argocd-repo-server

docs/developer-guide/running-locally.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,18 @@ Then you can build & push the image in one step:
222222
DOCKER_PUSH=true make image
223223
```
224224
225+
To speed up building of images you may use the DEV_IMAGE option that builds the argocd binaries in the users desktop environment
226+
(instead of building everything in Docker) and copies them into the result image:
227+
228+
```bash
229+
DEV_IMAGE=true DOCKER_PUSH=true make image
230+
```
231+
232+
> [!NOTE]
233+
> The first run of this build task may take a long time because it needs first to build the base image first; however,
234+
> once it's done, the build process should be much faster than a regular full image build in Docker.
235+
236+
225237
#### Configure manifests for your image
226238

227239
With `IMAGE_REGISTRY`, `IMAGE_NAMESPACE` and `IMAGE_TAG` still set, run:

0 commit comments

Comments
 (0)