Coder Social home page Coder Social logo

po3rin / gockerfile Goto Github PK

View Code? Open in Web Editor NEW
50.0 4.0 5.0 61 KB

:whale: gockerfile is a YAML Docker-compatible alternative to the Dockerfile Specializing in simple go server.

License: Apache License 2.0

Dockerfile 2.21% Makefile 12.28% Go 85.51%
go docker moby buildkit

gockerfile's Introduction

gockerfile

GolangCI

๐Ÿณ gockerfile is a YAML Docker-compatible alternative to the Dockerfile Specializing in simple go server.

Instalation as cmd

$ go get -u github.com/po3rin/gockerfile/cmd/gocker

Usage

po3rin/gocker config file

create Gockerfile.yaml (Gockerfile supports only 3 fields)

#syntax=po3rin/gocker

repo: 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.

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.

$ docker run -it -p 8080:8080 po3rin/gockersample:latest /bin/server
$ curl localhost:8080/
Hello World

gockerfile's People

Contributors

po3rin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

gockerfile's Issues

change sypport name for --local option

there is a bug (fixed #5 ). I should build public image.

buildctl build \
		--frontend=gateway.v0 \
		--frontend-opt=source=$(GATEWAY_IMAGE) \
		--local gockerfile=. \
		--local context=. \
		--exporter=docker \
		--exporter-opt name=$(IMAGE) | docker load

--local dockerfile returns following error

------
 > [internal] load Gockerfile from Gockerfile.yaml:
------
error: failed to solve: rpc error: code = Unknown desc = got error getting gockerfile: failed to resolve dockerfile: rpc error: code = Unknown desc = local source dockerfile not enabled from the client

failed to resolve Gockerfile when docker build

found bug

docker build -f Gockerfile.yaml -t po3rin/gockersample .
------
 > [internal] load Gockerfile from Gockerfile.yaml:
------
rpc error: code = Unknown desc = got error getting gockerfile: failed to resolve Gockerfile: rpc error: code = Unknown desc = local source gockerfile not enabled from the client

Update buildctl to v0.0.4.

should edit Makefile

WARN[0000] --exporter <exporter> is deprecated. Please use --output type=<exporter>[,<opt>=<optval>] instead.
WARN[0000] --frontend-opt <opt>=<optval> is deprecated. Please use --opt <opt>=<optval> instead.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.