Thiago's Space Blog

Just another blog, this one about my learnings as I join the Space Industry as a software engineer.

View on GitHub
5 January 2022

Dockerfile

Dockerfile for gRPC/REST server

I created a Dockerfile for yesterday’s gRPC/REST server. The Dockerfile and a few helper scripts to build/run the image are now available at https://github.com/thiagorobert/grpc-example.

It uses ubuntu:20.04 as the base image. I’ll probably upgrade to something more recent in the future (list of availalbe Ubuntu images). The contents of the Dockerfile are embedded below, and here’s a breakdown of what it does:

It’s probably worth taking a look at scripts to build and run the Docker image. Specifically, note that you should publish required container’s ports to the host when running (docs). These are 8080 for the gRPC interface, and 8081 for the REST interface.