-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/multistage #16
Conversation
using https://github.com/docker/build-push-action/ which enables multi-architecture builds and pushing to multiple registries, as well as other features available in buildx (such as build-time secrets)
Platform can be specified at build time using docker `buildx`. Resolves hadolint 3029 https://github.com/hadolint/hadolint/wiki/DL3029 See also: https://www.docker.com/blog/faster-multi-platform-builds-dockerfile-cross-compilation-guide/
merging `R` related RUN commands resolves hadolint 3059: https://github.com/hadolint/hadolint/wiki/DL3059
Hard code system dependencies into Dockerfile to avoid changing during build process.
It is better to install them ourselves so we know what is being included
Adding: * libicu-dev (needed by `stringi`) * `pandoc` (needed by `knitr` & `rmarkdown`)
reduce build context by ignoring anything that isn't actually used in the docker image
Using build stages, so the we can use `buildx`'s `no-cache-filters` to force fetching of the latest versions of the pacta packages
Docker image from this PR (a3af78e) created
|
@cjyetman Keeping this as draft until/if the prereqs are merged in, but you can see the proof of concept in the build logs: Using Multistage build with Compare to just using |
use buildx
--no-cache-filter
with multistage builds to not cache the installation of PACTA packages, but keep the cache for everything else (like system deps)Depends on #14 as base for dockerfile to split into stages.
Depends on #15 to ignore
.git
and.github
directoriesDepends on #12 to use
docker buildx