Dockerfiles: removing useless labels. Docs: now generating with Docker. Travis: publishing done with make

This commit is contained in:
Julien Neuhart
2018-12-14 09:13:04 +01:00
parent 4c1699df6c
commit a15cf33691
8 changed files with 312 additions and 215 deletions

View File

@@ -1,9 +1,12 @@
VERSION=snapshot
GOLANG_VERSION=1.11.2
VERSION=snapshot
DOCKER_USER=
DOCKER_PASSWORD=
# generate documentation.
doc:
static-docs --in build/docs --out docs --theme gotenberg --title Gotenberg --subtitle "A Docker-powered stateless API for converting HTML, Markdown and Office documents to PDF."
docker build --build-arg GOLANG_VERSION=$(GOLANG_VERSION) -t thecodingmachine/gotenberg:docs -f build/docs/Dockerfile .
docker run --rm -it -v "$(PWD):/docs" thecodingmachine/gotenberg:docs
# gofmt and goimports all go files.
fmt:
@@ -27,4 +30,8 @@ image:
# start the API using previously built Docker image.
gotenberg:
docker run -it --rm -p "3000:3000" thecodingmachine/gotenberg:$(VERSION)
docker run -it --rm -p "3000:3000" thecodingmachine/gotenberg:$(VERSION)
# publish Gotenberg images according to version.
publish:
./scripts/publish.sh $(GOLANG_VERSION) $(VERSION) $(DOCKER_USER) $(DOCKER_PASSWORD)