Skip to content

Compact dockerfile #1202

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 24 commits into from
Jun 27, 2025
Merged

Compact dockerfile #1202

merged 24 commits into from
Jun 27, 2025

Conversation

VincentGuyader
Copy link
Member

No description provided.

@VincentGuyader VincentGuyader requested a review from Copilot June 3, 2025 20:23
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds two new options—single_file and set_golem.app.prod—to the Dockerfile helpers, updating code and documentation so that multi-stage Dockerfiles are generated by default and golem.app.prod=TRUE is set automatically.

  • Introduce single_file and set_golem.app.prod parameters across all add_dockerfile_with_renv_* functions
  • Implement branching logic for single‐ vs. two‐stage Dockerfile generation
  • Update documentation and NEWS to describe the new defaults

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
man/dockerfiles.Rd Added single_file and set_golem.app.prod to function docs
R/add_dockerfiles_renv.R Added branching for multi-stage builds; new default options
NEWS.md Noted new defaults in release notes
DESCRIPTION Bumped dockerfiler dependency to ≥ 0.2.5
Comments suppressed due to low confidence (3)

R/add_dockerfiles_renv.R:449

  • In add_dockerfile_with_renv_shinyproxy, the dockerfile_cmd does not include the golem.app.prod option, so set_golem.app.prod is ignored. Update the command to options(..., golem.app.prod = %s) to honor that flag.
"R -e \"options('shiny.port'=3838,shiny.host='0.0.0.0');library(%1$s);%1$s::run_app()\""

R/add_dockerfiles_renv.R:158

  • [nitpick] This call uses get_golem_name(pkg = source_folder) but elsewhere you use get_golem_name(golem_wd = golem_wd). Standardize on one signature to avoid confusion and ensure consistency.
paste0(get_golem_name(pkg = source_folder), "_*.tar.gz")

man/dockerfiles.Rd:186

  • [nitpick] Remove the extra space before the period and consider clarifying default notation (e.g., (default: TRUE)) to match other parameter descriptions.
If \code{TRUE} (by default), generate a single multi-stage Dockerfile .

Your Name and others added 3 commits June 3, 2025 22:34
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@ThinkR-open ThinkR-open deleted a comment from Copilot AI Jun 27, 2025
@VincentGuyader VincentGuyader changed the title draft : Compact dockerfile Compact dockerfile Jun 27, 2025
@VincentGuyader VincentGuyader marked this pull request as ready for review June 27, 2025 05:35
VincentGuyader and others added 18 commits June 27, 2025 07:37
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
bump version
@VincentGuyader VincentGuyader merged commit ef359fe into master Jun 27, 2025
7 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant