An open API service indexing awesome lists of open source software.

https://github.com/tommaso-borgato/go-server

Simple GO HTTP server
https://github.com/tommaso-borgato/go-server

buildah dockerfile golang openshift podman

Last synced: 5 months ago
JSON representation

Simple GO HTTP server

Awesome Lists containing this project

README

          

# Simple GO HTTP server

This is a simple example showing how-to create a simple GO web app and then package it inside an "OpenShift ready" container;

## build

```
go build -o app
```

## run

```
./app
```

## test

```
curl localhost:8080
```

## containerize

```
go build -o app
sudo podman login registry.redhat.io
sudo podman pull registry.redhat.io/ubi8/ubi-minimal
sudo podman build --tag go-server -f ./Dockerfile
sudo podman run -p 8080:80 --name go-server --rm go-server
curl localhost:8080
```

### Verify the size of your image

```
sudo buildah images
```

> NOTE: initial GO module setup: `go mod init github.com/tommaso-borgato/go-server`