https://github.com/po3rin/gockerfile
:whale: gockerfile is a YAML Docker-compatible alternative to the Dockerfile Specializing in simple go server.
https://github.com/po3rin/gockerfile
buildkit docker go moby
Last synced: 3 months ago
JSON representation
:whale: gockerfile is a YAML Docker-compatible alternative to the Dockerfile Specializing in simple go server.
- Host: GitHub
- URL: https://github.com/po3rin/gockerfile
- Owner: po3rin
- License: apache-2.0
- Created: 2019-03-23T06:37:50.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-05-17T18:17:52.000Z (over 6 years ago)
- Last Synced: 2024-06-19T02:02:11.863Z (over 1 year ago)
- Topics: buildkit, docker, go, moby
- Language: Go
- Homepage:
- Size: 59.6 KB
- Stars: 50
- Watchers: 4
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gockerfile
[](https://golangci.com)
:whale:
gockerfile is a YAML Docker-compatible alternative to the Dockerfile Specializing in simple go server.## Instalation as cmd
```bash
$ go get -u github.com/po3rin/gockerfile/cmd/gocker
```## Usage
### po3rin/gocker config file
create Gockerfile.yaml (Gockerfile supports only 3 fields)
```yaml
#syntax=po3rin/gockerrepo: github.com/po3rin/gockerfile
path: ./example/server
version: v0.0.1 # default master
```repo is git repository. path is path to main.go.
### Build Gockerfile using docker build
you can build Gockerfile.yaml with docker build
```
$ DOCKER_BUILDKIT=1 docker build -f Gockerfile.yaml -t po3rin/gockersample .
```### Build Gockerfile with builtctl
using as buildkit frontend.
```bash
buildctl build \
--frontend=gateway.v0 \
--opt source=po3rin/gocker \
--local gockerfile=. \
--output type=docker,name=gockersample | docker load
```## Run container
You can run go API container as it is.
```bash
$ docker run -it -p 8080:8080 po3rin/gockersample:latest /bin/server
$ curl localhost:8080/
Hello World
```