This commit is contained in:
Michael Grote 2023-04-20 12:39:04 +02:00
parent 3dfc1a0309
commit aba24d3db1

View file

@ -18,27 +18,16 @@ steps:
- hadolint --version
- hadolint Dockerfile
- name: container
image: docker:dind
environment:
DOCKER_USERNAME:
- name: docker_build_and_push
image: plugins/docker
settings:
username:
from_secret: OCI-REGISTRY-USER
DOCKER_PASSWORD:
password:
from_secret: OCI-REGISTRY-PASS
commands:
- echo $DOCKER_USERNAME $DOCKER_PASSWORD
- docker build -t registry.mgrote.net/allzweckcontainer:latest .
#- docker tag registry.mgrote.net/allzweckcontainer:latest registry.mgrote.net/allzweckcontainer:${DRONE_COMMIT_SHA:0:8}
# - docker tag registry.mgrote.net/allzweckcontainer:latest registry.mgrote.net/allzweckcontainer:${DRONE_COMMIT_BRANCH}
- docker login registry.mgrote.net
- docker push registry.mgrote.net/allzweckcontainer:latest
# - docker push registry.mgrote.net/allzweckcontainer:${DRONE_COMMIT_SHA:0:8}
# - docker push registry.mgrote.net/allzweckcontainer:${DRONE_COMMIT_BRANCH}
volumes:
- name: dockersock
path: /var/run/docker.sock
volumes:
- name: dockersock
host:
path: /var/run/docker.sock
dockerfile: Dockerfile
repo: quotengrote/allzweckcontainer
tags:
- ${DRONE_COMMIT_SHA:0:8}
- ${DRONE_COMMIT_BRANCH}
- latest