Skip to content

Commit

Permalink
Add build image arg
Browse files Browse the repository at this point in the history
Signed-off-by: Enrique Lacal <enrique.lacal@kaleido.io>
  • Loading branch information
EnriqueL8 committed May 28, 2024
1 parent 9578869 commit acf3f3b
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/docker_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ jobs:
--label commit=$GITHUB_SHA \
--label build_date=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
--label tag=${{ steps.build_tag_generator.outputs.BUILD_TAG }} \
<<<<<<< HEAD
=======
--build-arg BASE_IMAGE=alpine:3.19 \
--build-arg BUILD_IMAGE=golang:1.21-alpine3.19 \
>>>>>>> 66e0aba (Add build image arg)
--tag ghcr.io/hyperledger/firefly-fabconnect:${{ steps.build_tag_generator.outputs.BUILD_TAG }} .

- name: Tag release
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/docker_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ jobs:
--label commit=$GITHUB_SHA \
--label build_date=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
--label tag=${GITHUB_REF##*/} \
<<<<<<< HEAD
=======
--build-arg BASE_IMAGE=alpine:3.19 \
--build-arg BUILD_IMAGE=golang:1.21-alpine3.19 \
>>>>>>> 66e0aba (Add build image arg)
--tag ghcr.io/hyperledger/firefly-fabconnect:${GITHUB_REF##*/} \
--tag ghcr.io/hyperledger/firefly-fabconnect:head \
.
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,9 @@ jobs:
--label commit=$GITHUB_SHA \
--label build_date=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
--label tag=${{ steps.build_tag_generator.outputs.BUILD_TAG }} \
<<<<<<< HEAD
=======
--build-arg BASE_IMAGE=alpine:3.19 \
--build-arg BUILD_IMAGE=golang:1.21-alpine3.19 \
>>>>>>> 66e0aba (Add build image arg)
--tag ghcr.io/hyperledger/firefly-fabconnect:${{ steps.build_tag_generator.outputs.BUILD_TAG }} .
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
<<<<<<< HEAD
FROM golang:1.21-alpine3.19 AS fabconnect-builder
=======
ARG BASE_IMAGE
ARG BUILD_IMAGE

FROM ${BUILD_IMAGE} AS fabconnect-builder
>>>>>>> 66e0aba (Add build image arg)
RUN apk add make
ADD . /fabconnect
WORKDIR /fabconnect
Expand Down
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ firefly-fabconnect: ${GOFILES}
$(VGO) build -o ${BINARY_NAME} -ldflags "-X main.buildDate=`date -u +\"%Y-%m-%dT%H:%M:%SZ\"` -X main.buildVersion=$(BUILD_VERSION)" -tags=prod -tags=prod -v
go-mod-tidy: .ALWAYS
go mod tidy
<<<<<<< HEAD
=======
docker:
docker build --build-arg BASE_IMAGE=alpine:3.19 --build-arg BUILD_IMAGE=golang:1.21-alpine3.19 -t hyperledger/firefly-fabconnect .
>>>>>>> 66e0aba (Add build image arg)
build: firefly-fabconnect-nocgo firefly-fabconnect
.ALWAYS: ;
clean:
Expand Down

0 comments on commit acf3f3b

Please sign in to comment.