Sign inSign up

funnyzak/hello

By funnyzak

Updated over 1 year ago

a simple "Hello, World!" program written in Go.

Image
Developer tools
0

7.3K

funnyzak/hello repository overview

Hello

Docker Tags Image Size Docker Stars Docker Pulls

This is a simple "Hello, World!" program written in Go. Used to demonstrate how to build a Docker image.

Docker Run

docker run --rm funnyzak/hello:latest

Docker Build

docker build -t funnyzak/hello:latest .

Code

package main

import "fmt"

func main() {
	fmt.Println("Hello, I am Leo. Contact me at https://github.com/funnyzak")
}

Dockerfile

FROM golang:1.23.3 AS builder
WORKDIR /app
RUN go mod init hello && go mod tidy
COPY hello.go ./
RUN go build -o hello hello.go
FROM scratch
COPY --from=builder /app/hello /hello
ENTRYPOINT ["/hello"]

Tag summary

Content type

Image

Digest

sha256:082a9aa48

Size

1.2 MB

Last updated

almost 2 years ago

docker pull funnyzak/hello