commit | 5cb1cce82918daf118082c3132ce96376b58fc4a | [log] [tgz] |
---|---|---|
author | Matteo Scandolo <matteo.scandolo@gmail.com> | Thu Nov 19 17:39:13 2020 -0800 |
committer | Matteo Scandolo <matteo.scandolo@gmail.com> | Fri Nov 20 12:25:05 2020 -0800 |
tree | c15a5927b32c689c93aa7db3b4e40ee311729fc2 | |
parent | 49a3545faa7f81604126477ecb2f5510d3db52b1 [diff] |
Using golang:1.13.9-alpine as base container for the gocover-cobertura tool (it requires Golang to be installed) Change-Id: Ie09642e350c579b4f759da4adad0ce766ec3673d
This repo contains Dockerfiles used to generate versioned tool containers.
Final docker images are tagged with the image version from the VERSION file. This allows projects to specify a single "voltha toolchain version" and get all relevant tool versions.
The VERSION file should be changed using these rules:
Only use containers tagged with <VERSION>-tool
.
Do NOT use containers tagged with tool-<TOOL_VERSION>
.
Some examples of how to use these containers:
docker run --rm --user $(id -u):$(id -g) -v $PWD:/app -v gocache:/.cache -v gocache-${VOLTHA_TOOLS_VERSION}:/go/pkg voltha/voltha-ci-tools:${VOLTHA_TOOLS_VERSION}-golang go <args>
docker run --rm --user $(id -u):$(id -g) -v $PWD:/app -v gocache:/.cache -v gocache-${VOLTHA_TOOLS_VERSION}:/go/pkg voltha/voltha-ci-tools:${VOLTHA_TOOLS_VERSION}-golangci-lint golangci-lint <args>
docker run --rm --user $(id -u):$(id -g) -v $PWD:/app voltha/voltha-ci-tools:${VOLTHA_TOOLS_VERSION}-protoc protoc <args>
docker run --rm --user $(id -u):$(id -g) -v $PWD:/app voltha/voltha-ci-tools:${VOLTHA_TOOLS_VERSION}-hadolint hadolint <args>
Details:
--user
is specified so that generated files have sane ownership and permissions.-v
bind-mounts the local folder into the container.-v
is also used by golang containers to bind-mount volumes for caches.make build
to build containersmake lint
to lint the Dockerfilesmake docker-push
to push built containers to a registry