Загрузка...

Good Dockerfiles - Ivan and Kyle Are reviewing a Golang app Dockerfile for "gofile" with Felipe Cruz

We reviewed the "gofile" ( https://github.com/felipecruz91/gofile ) application Felipe created and its Dockerfile ( https://github.com/felipecruz91/gofile/blob/main/Dockerfile ). The existing Dockerfile is interesting for a number of reasons. It has a number of good qualities we'll call out and discuss in addition to discussing what kind of improvements to make and what kind of gotchas to watch out for.

"gofile" is a statically compiled application and it uses Alpine for its container base image. We explored what you should be aware of working with compiled applications and using Alpine.

Finally, we also talked about "gofile" itself, what it does and building simple container images without Dockerfiles.

If you have a Dockerfile you'd like to improve or if you'd like to share a good Dockerfile you have or discovered submit it here for us to review: https://GoodDockerfiles.com

REFERENCES:

If you need to containerize a Golang-based application the following tutorials will be useful to you:

* "Building Container Images FROM Scratch: 6 Pitfalls That Are Often Overlooked" - https://labs.iximiuz.com/tutorials/pitfalls-of-from-scratch-images
* "How to Build Smaller Container Images: Docker Multi-Stage Builds" - https://labs.iximiuz.com/tutorials/docker-multi-stage-builds
* "Build a Production-Ready Go Container Image: A Dynamically Linked Application" - https://labs.iximiuz.com/challenges/dockerize-golang-application-dynamic-linking

If you want to build your own Dockerfile alternative with BuildKit take a look at these resources:

* https://mattrickard.com/building-a-new-dockerfile-frontend
* https://github.com/moby/buildkit/blob/master/docs/dev/dockerfile-llb.md

If you want to containerize a Golang app without using Dockerfiles you have a number of options:

* "gofile" - https://github.com/felipecruz91/gofile
* "mint" (MinToolkit aka DockerSlim) and its "imagebuild" command (example: `mint imagebuild --engine simple --exe-path ./local/path/to/appexe --image-name my-app-container:latest --runtime-load docker` ) - https://github.com/mintoolkit/mint
* "ko" - https://github.com/ko-build/ko

NOTEBOOK LM SUMMARY:

https://github.com/GoodDockerfiles/dockerfile-reviews/blob/main/gofile_golang_app_dockerfile/README.md#notebooklm-summary-of-the-stream

Видео Good Dockerfiles - Ivan and Kyle Are reviewing a Golang app Dockerfile for "gofile" with Felipe Cruz канала Cloud Native Container Craft with Ivan and Kyle
Страницу в закладки Мои закладки
Все заметки Новая заметка Страницу в заметки