-
Notifications
You must be signed in to change notification settings - Fork 27
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
add_dockerfile() should use GITHUB_PAT when calling remotes::install_github #18
Comments
Original issue from @antoine-sachet |
Bumping this! |
Hi, have à look to the add_dockerfile_with_renv function :) |
Hi @VincentGuyader, |
hi you can install golem with :
then run |
Hi @VincentGuyader , |
Hi @VincentGuyader, |
yes, PR welcome :) |
Context: I manage a shinyproxy server and we use golem for most of our apps. They deploy via an AWS CD pipeline powered by a Dockerfile created with
golem::add_dockerfile()
Problem: docker build can fail when installing packages from github because the rate limit of the GitHub API is exceeded.
For example, this is from my AWS build log:
Solution: Change the command used to install packages from github in the Dockerfile:
should become
This would allow the user to pass a
GITHUB_PAT
when building the docker image and avoid the rate limit. Another HUGE advantage is that it would allow access to private repository!I would suggest adding a logical argument
use_github_pat = FALSE
to the variousadd_dockerfile_XXX()
functions. The default value (FALSE
) would preserve the existing behaviour butuse_github_pat = TRUE
would add the necessary code in the Dockerfile.Note that the user does not need to pass the value of their GITHUB_PAT to add_dockerfile. Instead it must be passed as a build argument when calling
docker build
.The text was updated successfully, but these errors were encountered: