Exercise 1: Go Packages and Functions
Explore how to implement a GitLab CI/CD pipeline that builds Docker images from Go applications, pushes them to Docker Hub, and runs the Go program inside a container. Understand how to set up Dockerfiles, manage credentials securely, and automate image tagging and deployment.
We'll cover the following...
Let’s practice what we’ve learned so far in the following exercise. The solution to this exercise has been provided in the next lesson.
Problem
Use GitLab CI/CD to push Docker images to Docker Hub.
General instructions
Here are the general steps to use GitLab CI/CD to push Docker images to Docker Hub:
Set up a GitLab repository: Create a new repository or use an existing one on GitLab.
Create a Dockerfile: Create a Dockerfile in the root of your repository. The Dockerfile contains instructions for building your Docker image.
Configure GitLab CI/CD ...