Introducing 

Prezi AI.

Your new presentation assistant.

Refine, enhance, and tailor your content, source relevant images, and edit visuals quicker than ever before.

Loading…
Transcript

Better Docker images for Go

27/02/2018

Meetup

(Golang / Modern Devops) Paris

Julien CROUZET

eTF1

Basics

Standard images

• Use standard "FROM golang" and build

BASICS

• Optimize Dockerfile for caching

• Use Golang:onbuild

Standard

Binary built in image

Big image size

Lot of unnecessary files

Lighter

Optimize image building

to make it lighter

• .dockerignore or specify files

MAKE IT LIGHTER

• Use alpine-based Golang image

• Binary-only image without go

Lighter images

No unnecessary files

Go as prerequisite on CI system

Smarter

Keep lighter images,

with a smarter build

• Docker multistage (>=17.05)

MAKE IT SMARTER

• Generate multiple versions (run & debug)

• Complex case with prebuilt image

Lighter images

No unnecessary files

Build outside container

Non-go binary

QUESTIONS ?

CONCLUSION

Learn more about creating dynamic, engaging presentations with Prezi