Skip to content

Commit

Permalink
Fix build paths
Browse files Browse the repository at this point in the history
  • Loading branch information
johnmaguire committed Dec 8, 2023
1 parent 0f75c37 commit 3430b36
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,7 @@ build/nebula-%.zip: build/%/nebula.exe build/%/nebula-cert.exe
cd build/$* && zip ../nebula-$*.zip nebula.exe nebula-cert.exe

docker/%: build/%/nebula build/%/nebula-cert
cp -r build release
docker buildx build . $(DOCKER_BUILD_ARGS) -f docker/Dockerfile --platform "$(subst -,/,$*)" --tag "nebula:latest" --tag "nebula:$(BUILD_NUMBER)"
docker buildx build . $(DOCKER_BUILD_ARGS) -f docker/Dockerfile --platform "$(subst -,/,$*)" --build-arg SOURCEDIR="build/$*" --tag "nebula:latest" --tag "nebula:$(BUILD_NUMBER)"

vet:
go vet $(VET_FLAGS) -v ./...
Expand Down
5 changes: 3 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
FROM alpine:latest

ARG TARGETPLATFORM
ARG SOURCEDIR
RUN echo "Building image for $TARGETPLATFORM"

COPY release/$TARGETPLATFORM/nebula /usr/local/bin/nebula
COPY release/$TARGETPLATFORM/nebula-cert /usr/local/bin/nebula-cert
COPY $SOURCEDIR/nebula /usr/local/bin/nebula
COPY $SOURCEDIR/nebula-cert /usr/local/bin/nebula-cert

RUN chmod +x /usr/local/bin/nebula && \
chmod +x /usr/local/bin/nebula-cert
Expand Down

0 comments on commit 3430b36

Please sign in to comment.