Skip to content

A hello world GO application packaged and developed using Nix and Docker

Notifications You must be signed in to change notification settings

RobbieJennings/hello-gonix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Nix Flake to package a hello world GO application providing a development shell and minimal Docker image

Enter the devshell

$ nix develop

Run the GO application directly

$ go run main.go

(First time only) Initialize the GO module

$ go mod init example.com/hello
$ go mod tidy

Build the GO application

$ go build -o hello
$ ./hello

Alternatively, build the GO application using Nix

$ nix build
$ ./result/bin/hello

Bundle the GO application into a Docker image

$ nix build .#dockerImage
$ docker load < result
$ docker run -p 8080:8080 hello:latest

About

A hello world GO application packaged and developed using Nix and Docker

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published