Skip to content

popovicu/golang-container-bazel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OCI container with Bazel

This small repo is meant to demonstrate an HTTP server container which is super easy to build and deploy.

Please read the accompanying article on my website for more details.

Building

bazel build //container

The output is a tarball that can further be loaded into something like Docker and executed.

...
INFO: Found 1 target...
Target //container:container up-to-date:
  bazel-bin/container/container/tarball.tar
...

For Docker, load like this:

docker load < tarball.tar

Run the container with port forwarding to 12345:

docker run -p 12345:12345 --name myfoo popovicu.com/foo:latest

Test with curl:

curl http://localhost:12345/hello/world

Output:

Hello world

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published