funnyzak/hello
a simple "Hello, World!" program written in Go.
116
This is a simple "Hello, World!" program written in Go. Used to demonstrate how to build a Docker image.
docker run --rm funnyzak/hello:latest
docker build -t funnyzak/hello:latest .
package main
import "fmt"
func main() {
fmt.Println("Hello, I am Leo. Contact me at https://github.com/funnyzak")
}
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"]
docker pull funnyzak/hello