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]
|
- !reference [.auth_gitlab, before_script]
|
||||||
script:
|
script:
|
||||||
- docker buildx create --use
|
- docker buildx create --use
|
||||||
- docker compose build godash
|
- docker buildx build \
|
||||||
- docker tag $CURRENT_IMAGE $LATEST_IMAGE
|
--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 $CURRENT_IMAGE
|
||||||
- docker push $LATEST_IMAGE
|
- docker push $LATEST_IMAGE
|
||||||
after_script:
|
after_script:
|
||||||
|
|
15
compose.yml
15
compose.yml
|
@ -84,21 +84,6 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- .:/app/
|
- .:/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:
|
golang:
|
||||||
profiles: [install]
|
profiles: [install]
|
||||||
image: golang:${V_GOLANG}-alpine
|
image: golang:${V_GOLANG}-alpine
|
||||||
|
|
Loading…
Reference in a new issue