Improved Docker image build / sandbox setup process #99
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've been playing with Packj in a way that has necessitated a lot of Docker rebuilds. I eventually opted to try to speed the build process up a bit. These are the associated changes, if you are interested in taking them on.
apt
command-line too withapt-get
.apt
has an unstable interface and its authors recommend against using it in an automated fashion.setup.sh
) changes:set -uo pipefail
andIFS=$'\n\t'
('Unofficial bash strict mode') per bash practice for bash scripts. Note thatset -e
(usually part of strict mode) was not easily doable here (without changing how the script works). To minimise changes, I just excluded it, but it'd be nice to be able to use it at some point in the future.-v
flag will print output that was previously just written to a log file. I added this to make the Docker image creation process more verbose, per best practice as you typically won't get access to log files written during the image build process.