U
U
Username2020-12-22 17:56:46
Continuous Integration
Username, 2020-12-22 17:56:46

How to deploy an artifact in a video docker image to the server in gitlab CI?

Good evening!

There is a repository in GitLab, and the following instruction is .gitlab-ci.yml

.gitlab-ci.yml
image: docker:19.03.8

stages:
  - build

# https://docs.gitlab.com/ee/ci/variables/predefined_variables.html
variables:
  IMAGE_TAG: $CI_REGISTRY_IMAGE:b$CI_PIPELINE_ID-$CI_COMMIT_REF_SLUG

build:
  stage: build
  script:
    - docker build --pull -t $IMAGE_TAG .
    - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
    - docker push $IMAGE_TAG


  1. !!! How to deploy an artifact in the form of a docker image to a remote server and run it?
  2. How can I organize the process so that nginx is configured automatically at the first deployment?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question