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
- Host: GitHub
- URL: https://github.com/tommaso-borgato/go-server
- Owner: tommaso-borgato
- Created: 2020-12-16T15:27:39.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2020-12-23T15:59:01.000Z (over 5 years ago)
- Last Synced: 2024-06-19T15:00:16.688Z (about 2 years ago)
- Topics: buildah, dockerfile, golang, openshift, podman
- Language: Go
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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`