create a pipeline for building and releasing a Docker image using GitLab Cl with
predefined variables. It contains all necessary variables to build, tag and push the image. Your pipeline
should include two stages executed in the following order:
build - executed for each commit. It should include the following steps:
1. pull the latest version of a Docker image from the GitLab Cl registry;
2. use it as a cache to build a new image with two tags: commit's short SHA and latest;
3. push to the GitLab Cl registry an image with commit's short SHA tag;
4. push to the GitLab Cl registry an image with the latest tag.
release - executed only when commit has been tagged. It should do the following:
1. pull a Docker image referring to commit's short SHA;
2. tag it with a value from a Git commit tag;
3. push it to the GitLab Cl registry.
Be sure to define commands in the exact order as described above.
To use Docker in the GitLab Cl you will need to set up the DinD (Docker in Docker) service for both stages.
Use a default section which will:
• define a tIs connection to tep://docker : 2376 using certificates located in the /cert directory;
setup the DinD service in version 19.03.1;
use the docker image in version 19.03.1;
use the before script command to log into the GitLab Cl registry in a non-interactive way.
The repository structure looks like this:
[login to view URL]
4 freelancers are bidding on average $481 for this job
I have vast grip on Docker and git-lab CI/CD that makes me more suitable for the job not only this but also I have experience with similar project can check on git-hub [login to view URL]