Introduction
While most Go applications compile to a single binary, web applications also ship with templates, assets and configuration files; these can get out of sync and cause faulty deployments.
Docker lets us create a self-contained image with everything our application needs to work. In this tutorial, you will learn how to deploy a Go web application with Docker, and how Docker can help improve your development workflow and deployment process.
Goals
By the end of this article, you will:
- Have a basic understanding of Docker,
- Find out how Docker can help you while developing a Go application,
- Learn how to create a Docker container for a Go application for production, and
- Know how to use Continuous Integration and Delivery (CI/CD) to automatically build a Docker image.
Prerequisites
For this tutorial, you will need:
- Docker installed on your machine.
- A free Docker Hub account.
- A Semaphore account, you can get one for free using the Sign up with GitHub…