eugenestarchenko / golang-sample-app

Example application with Golang and Docker

Home Page:https://codefresh.io/docs/docs/learn-by-example/golang/golang-hello-world/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Codefresh Go example

Original source: https://github.com/callicoder/go-docker

Build locally

Normal docker build (not using modules) - image size is 775MB

docker build . -t go-sample-app-full

Optimized Build (with modules - image size is 389MB

docker build . -f Dockerfile.mod -t go-sample-app-modules

Multi-stage build (fully optimized) - image size is 16 MB

docker build . -f Dockerfile.multistage -t go-sample-app-multi

Run locally

docker run -p 8080:8080 go-sample-app-multi

and then visit in your browser

Build in Codefresh

Sample pipelines:

Read https://codefresh.io/docs/docs/learn-by-example/golang/golang-hello-world/ for more details

About

Example application with Golang and Docker

https://codefresh.io/docs/docs/learn-by-example/golang/golang-hello-world/


Languages

Language:Go 78.3%Language:Dockerfile 21.7%