commit | da41d74f2278862afaf7947c23320d4705a46b38 | [log] [tgz] |
---|---|---|
author | Kent Hagerman <khagerma@ciena.com> | Tue Jan 07 14:55:56 2020 -0500 |
committer | Kent Hagerman <khagerma@ciena.com> | Tue Jan 28 11:44:23 2020 -0500 |
tree | 4b56dc0e177801964fd6e5b4dcf20654efaa6873 | |
parent | e388c3a635ed56069e45c73f3fbacab06ab16359 [diff] |
Initial commit. Tools currently available are: go-junit-report, gocover-cobertura, golang, golang-ci-lint, hadolint, and protoc. VERSION has been set to 1.0.0 Change-Id: Ib003e99ff36903da21db48e80153b1348e19d3c9
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