Skip to content

Commit

Permalink
usind docker to build container
Browse files Browse the repository at this point in the history
  • Loading branch information
stlankes committed Apr 26, 2021
1 parent 4caeaf2 commit dc57117
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,26 @@ variables:
DOCKER_FILE: Dockerfile
DOCKER_TAG: latest
DOCKER_IMAGE: ${CI_REGISTRY_IMAGE}
IMAGE: ${CI_REGISTRY_IMAGE}
GIT_SUBMODULE_STRATEGY: normal
FF_GITLAB_REGISTRY_HELPER_IMAGE: 1

.prepare:docker: &prepare_docker
stage: prepare
image:
name: quay.io/buildah/stable
name: docker
variables:
_BUILDAH_STARTED_IN_USERNS: ""
BUILDAH_ISOLATION: chroot
BUILDAH_LAYERS: "true"
before_script:
- buildah version
- buildah login --username "${CI_REGISTRY_USER}" --password "${CI_REGISTRY_PASSWORD}" "${CI_REGISTRY}"
- docker version
- docker login --username "${CI_REGISTRY_USER}" --password "${CI_REGISTRY_PASSWORD}" "${CI_REGISTRY}"
script:
- buildah bud -f ${DOCKER_FILE} -t ${DOCKER_IMAGE}:${DOCKER_TAG} .
- buildah push ${DOCKER_IMAGE}:${DOCKER_TAG} docker://${DOCKER_IMAGE}:${DOCKER_TAG}
after_script:
- buildah logout "${CI_REGISTRY}"
- docker build -f ${DOCKER_FILE} -t ${DOCKER_IMAGE}:${DOCKER_TAG} .
- docker push ${DOCKER_IMAGE}:${DOCKER_TAG}
tags:
- builder
- docker

prepare:docker:
<<: *prepare_docker
Expand Down

0 comments on commit dc57117

Please sign in to comment.