Skip to content

brentquackenbush/container-from-scratch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Containers From Scratch in Go

Replicates the core of docker run in Go.

💡 WHY THIS MATTERS: Understanding containers is key for modern software deployment. Containers streamline building, scaling, and running apps, making you a better developer.

⚠️ Linux user? You can run this directly via CLI. Not on Linux? Here's how to run it with Docker:

1. Install Docker

  • Download Docker from Docker Desktop.
  • Install and launch Docker Desktop.

2. Build the Docker Image

Run this in your project directory:

docker build -t container-from-scratch .

3. Run the Container

After building the image, you can run your Go application inside a Docker container:

📌 Note: The --privileged flag is needed due to Docker’s default security mechanisms.

docker run --rm -it --privileged container-from-scratch ./main run /bin/bash
  • --rm: Removes the container after stopping.
  • -it: Opens an interactive terminal.

Releases

No releases published

Packages

No packages published