aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/build_defs/docker/docker.bzl
Commit message (Collapse)AuthorAge
* docker_build: Properly handle / as data_pathGravatar Kamal Marhubi2015-12-04
| | | | | | | | | | | | | | | | | | | | The handling in _compute_data_path would incorrectly result in an empty strip_prefix being passed to _dest_path. The outcome was all files would end up at the top of directory, instead of nested according to the repository structure. This change brings the behavior in line with the documentation, which states: > This path can be absolute from the workspace root if starting with a > `/` or relative to the rule's directory. Fixes https://github.com/bazelbuild/bazel/issues/677 -- Change-Id: Ifdab97ed0e851cf6cabc7bd3206343766861b725 Reviewed-on: https://bazel-review.googlesource.com/#/c/2480 MOS_MIGRATED_REVID=109418486
* Rollback of commit 07475c7b3812d6194602213a69e6e9f70643b32a.Gravatar Damien Martin-Guillerez2015-11-20
| | | | | | | | | | | | *** Reason for rollback *** Roll-forward with fixes: - Tests were missing for xzcat - xz output was not supported - bz2 input was missing declaration -- MOS_MIGRATED_REVID=108325435
* Rollback of commit 976211dd45215a6146e0ab312186de0eaa955a75.Gravatar Googler2015-11-18
| | | | | | | | | | | | | | | | | *** Reason for rollback *** broke Speckle and Dataflow *** Original change description *** [docker] Print a clearer message when xzcat cannot be found and is needed Also use the default shell env for docker deb files. Fixes #611. -- MOS_MIGRATED_REVID=108105646
* [docker] Print a clearer message when xzcat cannot be found and is neededGravatar Damien Martin-Guillerez2015-11-18
| | | | | | | | | Also use the default shell env for docker deb files. Fixes #611. -- MOS_MIGRATED_REVID=108035989
* [docker] Fixes parsing of data_path for './'Gravatar Damien Martin-Guillerez2015-11-17
| | | | | | | Fixes #604. -- MOS_MIGRATED_REVID=107972542
* Allow udeb as input of docker debsGravatar Damien Martin-Guillerez2015-11-17
| | | | | | | Fixes #618. -- MOS_MIGRATED_REVID=107957576
* Introduce debian and tar packaging rulesGravatar Damien Martin-Guillerez2015-10-09
| | | | | | | | | | | This refactor a bit the docker rules to reuse the tarball construction. Also introduce the debian archive for the release process. RELNOTES[NEW]: Debian and tar packaging is now supported (see tools/build_defs/pkg/README.md). -- MOS_MIGRATED_REVID=105053604
* Rolling-forward with fix:Gravatar Damien Martin-Guillerez2015-10-08
| | | | | | | | | | | | | | | | | | | | | Incremental build and load of Docker layers Previously we were always tar-ing all the layers in the final image. This change does not build the full image except if required. It instead only builds the concerned layer and a loader that loads all the layers that were not previously loaded in your local registry. This is somewhat incompatible with the previous version since the full tar file is not built anymore if not explicitly requested. See https://goo.gl/P6CVyG for an extensive comparison of this change. RELNOTES: [docker_build] incremental loading is default now. Specify explicitly //package:target.tar (with the .tar extension) to obtain the full image. -- MOS_MIGRATED_REVID=104844423
* Rollback of commit fb8ee791d3b39f294bf4e083b972aee2ac6f8e27.Gravatar Damien Martin-Guillerez2015-10-07
| | | | | | | | | *** Reason for rollback *** Broke internal builds -- MOS_MIGRATED_REVID=104801084
* Incremental build and load of Docker layersGravatar Damien Martin-Guillerez2015-10-06
| | | | | | | | | | | | | | | | | | | Previously we were always tar all the layers in the final image. This change do not build the full image except if required. It instead only build the concerned layer and a loader that loads all the layer that were not previously loaded in your local registry. This is somewhat incompatible with the previous version since the full tar file is no more build if not explicitely requested. RELNOTES: [docker_build] incremental loading is default now. Specify explicitly //package:target.tar (with the .tar extension) to obtain the full image. -- Change-Id: I75c96d819f2a0f7c9444723b04b660b4939350ec Reviewed-on: https://bazel-review.googlesource.com/#/c/1820/ MOS_MIGRATED_REVID=104737560
* [Docker] add a `repository` attributeGravatar Damien Martin-Guillerez2015-10-01
| | | | | | | | This attribute specifies the default repository for the generated image. -- MOS_MIGRATED_REVID=104408398
* [docker] Add workdir attributeGravatar Damien Martin-Guillerez2015-09-30
| | | | | | | | | | | | The workdir attribute set the initial working directory when starting the docker container. Contrary to the WORKDIR directive (see https://docs.docker.com/reference/builder/#workdir), it only affects the entry point. -- MOS_MIGRATED_REVID=104201472
* Rationalize copyright headersGravatar Damien Martin-Guillerez2015-09-25
| | | | | | | | | | | The headers were modified with `find . -type f -exec 'sed' '-Ei' 's|Copyright 201([45]) Google|Copyright 201\1 The Bazel Authors|' '{}' ';'` And manual edit for not Google owned copyright. Because of the nature of ijar, I did not modified the header of file owned by Alan Donovan. The list of authors were extracted from the git log. It is missing older Google contributors that can be added on-demand. -- MOS_MIGRATED_REVID=103938715
* [Docker] Make all files added via the files attribute executable and read-onlyGravatar Damien Martin-Guillerez2015-09-24
| | | | | | | | | | | | Also adds a `mode` attribute to docker_build so you can specify the mode you prefer. RELNOTES: [docker] docker_build now set the permission to 0555 to files added to the layer, use `mode = "0644"` to use the legacy behavior. -- MOS_MIGRATED_REVID=103743458
* [Docker] Take the package of the input as the data pathGravatar Damien Martin-Guillerez2015-09-24
| | | | | | | | | | | | By default all input files path are taken relatively to their declared package and no more relatively to the docker_build package. The old behavior can be restored by specifying `data_path = "."` as an attribute of the docker_build target. -- MOS_MIGRATED_REVID=103731161
* Fix docker_build file path when file is generatedGravatar Damien Martin-Guillerez2015-08-04
| | | | | | | | | | | | | | | If the file is generated, by a genrule for instance, then the stripping of the prefix was incorrect because the used path was containing 'bazel-out/...' prefix. This change moved the prefix stripping to the Skylark rule so we can use "short_path". Also fix the test paths. Tested by bazel test //tools/build_defs/docker:build_test. -- Change-Id: Ia3eb98268505002bade1f6b0dd916e1a9767a530 Reviewed-on: https://bazel-review.googlesource.com/1770 MOS_MIGRATED_REVID=99710676
* Add docker_build for building Docker image using BazelGravatar Damien Martin-Guillerez2015-07-27
docker_build is a Skylark rule that describe a docker image. You can replace Dockerfile by a docker_build to use Bazel's incrementality model. -- MOS_MIGRATED_REVID=99160762