'COPY *' has a different behavior than 'COPY .' - when regexes are
involved, COPY behave differently, by unpacking directory content to the
root.
Enhance unit test to cover the scenario as well
We used to create dockerfiles blindly assuming there is content, but
that's not the case for virtual packages.
Due to https://github.com/moby/moby/issues/38039 we are forced for a
"unpleasant" workaround, as we can't create empty FROM scratch images
and export them.
CopyFile relies on copy.Copy from https://github.com/otiai10/copy which
doesn't handle named pipes copy. Handle it here until
https://github.com/otiai10/copy/issues/47 is fixed.
This causes luet to hang while copying packages that have named pipes in
it.
Also invert compression argument for gzip, it causes slowliness.
Several changes are included:
- Expose ensureDir in helpers, and call it in the Docker client. In
other implementations that was handled by CopyFile behind the scenes,
but that's not the case here
- Create accessor in Artifact to create Artifact objects from files.
This is handy when we have to carry over downloaded package content
into caches when artifacts are already verified
- Fix various issues around the imagePush flag, so now trees are pushed
forcefully each time
- Take into consideration the real artifact name when pushing single
files in the docker image. This behavior should be changed eventually,
because single files which aren't repository packages now are in its
own docker image, but we should have just one that brings the required
metadata alltogether.
Is it more faster in this way as we already have all the needed folders
to the comparison extracted. In this way we don't repeat I/O operation
twice by calling container-diff.
Do not depend on container-diff anymore
Currently, it's used the archive.ReplaceFileTarWrapper
that requite a []byte of the files replaced. This is not
a good idea if files are big and instead could be better
in the near future reimplement ReplaceFileTarWrapper with
a callback that return io.Reader instead of []byte.
If a protected file is already present on target rootfs
it is created a file with the same prefix used in Gentoo:
._cfgXXXX_<filename>
TODO: Handle the path substitution in a separate field
Adds GZip support and allows the compiler to switch compression type.
It also adds Concurrency as a compiler attribute (not consumed yet)
Refers to #33
Add CompilationSpecs type to handle slices of CompilationSpec, to
perform operation such as Unique() and Remove().
Add also dependencies and the spec associated to the Artifact, to track
how the artifact was generated.
Add revdeps compilation wrapper, and unit tests