Skip to content
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

Supplying a renv.lock file causes issues building the second docker #1099

Open
ncullen93 opened this issue Aug 30, 2023 · 0 comments
Open

Supplying a renv.lock file causes issues building the second docker #1099

ncullen93 opened this issue Aug 30, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@ncullen93
Copy link

ncullen93 commented Aug 30, 2023

If you supply a lockfile to golem::add_dockerfile_with_renv_heroku() called simply renv.lock then the second/main Dockerfile created still expects a file called renv.lock.prod which is what is automatically generated when you do not supply a lockfile. I believe the Dockerfile_base does pick up the difference though.

I think a workaround is to just rename the renv.lock to renv.lock.prod in the deploy folder. I think this issue also occurs when creating a generic dockerfile. I will look into it.

Example Dockerfile:

...
COPY renv.lock.prod renv.lock
RUN R -e 'renv::restore()'
COPY phase_*.tar.gz /app.tar.gz
RUN R -e 'remotes::install_local("/app.tar.gz",upgrade="never")'
RUN rm /app.tar.gz
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants