golang-docker-api

command module
v0.0.0-...-b3ad290 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 26, 2021 License: MIT Imports: 5 Imported by: 0

README

Golang REST API + Docker Example 🐭🐳📦

This is a brief example project showing how to package a REST API application as a Docker image running a static binary.

Usage

Docker Compose

Build the image and launch a container.

docker-compose up --build -d
docker-compose logs -f

Then hit it with requests using your favourite tool and follow the log output.

curl -x GET http://localhost:3000/users | jq
GitHub Codespaces
  1. Open this repository in github.com
  2. Press . to launch the GitHub web editor
  3. From the bottom-left corner, choose Continue working on and choose Create New Codespace
  4. Wait for the build to finish, and run make start to start the server inside the running container, or make build to compile
VS Code Dev Container
  1. Open the repository in VS Code
  2. From the remote containers menu in the bottom-left corner, choose Reopen in container
  3. Repeat step #4 from above

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL