In this lesson, we are going to create a Docker container that will act as an executable to process some image files. We are going to use Go (Golang) to write an image processing program. For this, we would be working with Docker VOLUME, ENTRYPOINT, and other Dockerfile instructions.

In the previous lesson, we learned how to create a Docker image using a Dockerfile as well as creating and managing Docker containers. We discussed a few Dockerfile instructions such as FROM, WORKDIR, ADD, COPY, CMD, etc. and how they contribute to the image-building process.

In this lesson, we are going to discuss the ENTRYPOINT instruction to create a Docker container that acts like an executable. We will also discuss how to share files between a Docker container and the host machine.

For this lesson, we are going to use Go (golang) to write an image processing program. Therefore, we would need a parent image with Go installation. We would be using the golang:1.15.6-alpine3.12 as a parent image for the image we are going to build in this lesson.

💡 If you are not familiar with Go (golang) programming language, I would recommend you to check out my articles on Go from the RunGo publication. It is a simple yet powerful programming language.

To install Go on your system, follow this official documentation. We are using Go v1.15.6 for this lesson and we are using the same version for the parent image. Local installation of Go is not necessary but we would want to test our Go program first before creating a Docker image.





#docker #go #golang #developer

Docker Container as an Executable to Process Images using Go (Golang)
1.85 GEEK