Better build command
This commit is contained in:
parent
90323b378b
commit
b5d0862303
2 changed files with 10 additions and 17 deletions
|
@ -28,8 +28,16 @@ build:
|
|||
- !reference [.auth_gitlab, before_script]
|
||||
script:
|
||||
- docker buildx create --use
|
||||
- docker compose build godash
|
||||
- docker tag $CURRENT_IMAGE $LATEST_IMAGE
|
||||
- docker buildx build \
|
||||
--provenance=false \
|
||||
--platform=linux/amd64,linux/arm64 \
|
||||
--build-arg APP_VERSION=${CI_COMMIT_TAG} \
|
||||
--build-arg V_GOLANG=${V_GOLANG} \
|
||||
--build-arg V_NODE=${V_NODE} \
|
||||
--build-arg V_ALPINE=${V_ALPINE} \
|
||||
--tag ${CURRENT_IMAGE} \
|
||||
--tag ${LATEST_IMAGE} \
|
||||
--pull --push
|
||||
- docker push $CURRENT_IMAGE
|
||||
- docker push $LATEST_IMAGE
|
||||
after_script:
|
||||
|
|
15
compose.yml
15
compose.yml
|
@ -84,21 +84,6 @@ services:
|
|||
volumes:
|
||||
- .:/app/
|
||||
|
||||
godash:
|
||||
profiles: [build]
|
||||
image: ${CURRENT_IMAGE}
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
platforms:
|
||||
- linux/amd64
|
||||
- linux/arm64
|
||||
args:
|
||||
- V_GOLANG=${V_GOLANG}
|
||||
- V_NODE=${V_NODE}
|
||||
- V_ALPINE=${V_ALPINE}
|
||||
- APP_VERSION=${CI_COMMIT_TAG}
|
||||
|
||||
golang:
|
||||
profiles: [install]
|
||||
image: golang:${V_GOLANG}-alpine
|
||||
|
|
Loading…
Reference in a new issue