Skip to content

Latest commit

 

History

History
58 lines (40 loc) · 1019 Bytes

File metadata and controls

58 lines (40 loc) · 1019 Bytes

README

Building a Nix image inside a container

🏠 Build nix image builer

# build nix
docker build -t nix .

# build the image (creates a docker-image file in current path)    
docker run -v $(pwd):/build -it nix     

🏠 Load image into registry

# load image into local registry
docker load < docker-image

# should be most recent image
docker images

🏠 Inside build container

# look at files
dive bash:latest

# jump into bash in container
docker run -it bash:latest

# use curl inside the container
curl https://www.google.com

# ignore tls certs
curl -k https://www.google.com

🔍 Vulnerability scanning

# zero vulnerabilities for bash
docker scan bash:latest 

🔍 Troubleshooting

# debugging
docker run -v $(pwd):/build -it --entrypoint /bin/sh nix    
nix-build --show-trace

👀 Resources

  • Good example nix buildImage here