@@ -270,56 +270,57 @@ add_dockerfile_with_renv <- function(
270
270
... ,
271
271
source_folder
272
272
) {
273
- signal_arg_is_deprecated(
274
- source_folder ,
275
- fun = as.character(sys.call()[[1 ]]),
276
- " source_folder"
277
- )
278
-
279
- base_dock <- add_dockerfile_with_renv_(
280
- golem_wd = golem_wd ,
281
- lockfile = lockfile ,
282
- output_dir = output_dir ,
283
- distro = distro ,
284
- FROM = from ,
285
- AS = as ,
286
- sysreqs = sysreqs ,
287
- repos = repos ,
288
- expand = expand ,
289
- extra_sysreqs = extra_sysreqs ,
290
- update_tar_gz = update_tar_gz ,
291
- document = document ,
292
- single_file = single_file ,
293
- ...
294
- )
295
- if (! is.null(port )) {
296
- base_dock $ EXPOSE(port )
297
- }
298
- if (! is.null(user )) {
299
- base_dock $ USER(user )
300
- }
301
- if (is.null(dockerfile_cmd )) {
302
- dockerfile_cmd <- sprintf(
303
- " R -e \" options('shiny.port'=%s,shiny.host='%s',golem.app.prod=%s);library(%4$s);%4$s::run_app()\" " ,
304
- port ,
305
- host ,
306
- set_golem.app.prod ,
307
- get_golem_name(
308
- golem_wd = golem_wd
309
- )
310
- )
311
- }
312
- base_dock $ CMD(
313
- dockerfile_cmd
314
- )
315
- base_dock
316
- base_dock $ write(as = file.path(output_dir , " Dockerfile" ),
317
- append = single_file )
273
+ signal_arg_is_deprecated(
274
+ source_folder ,
275
+ fun = as.character(sys.call()[[1 ]]),
276
+ " source_folder"
277
+ )
318
278
279
+ base_dock <- add_dockerfile_with_renv_(
280
+ golem_wd = golem_wd ,
281
+ lockfile = lockfile ,
282
+ output_dir = output_dir ,
283
+ distro = distro ,
284
+ FROM = from ,
285
+ AS = as ,
286
+ sysreqs = sysreqs ,
287
+ repos = repos ,
288
+ expand = expand ,
289
+ extra_sysreqs = extra_sysreqs ,
290
+ update_tar_gz = update_tar_gz ,
291
+ document = document ,
292
+ single_file = single_file ,
293
+ ...
294
+ )
295
+ if (! is.null(port )) {
296
+ base_dock $ EXPOSE(port )
297
+ }
298
+ if (! is.null(user )) {
299
+ base_dock $ USER(user )
300
+ }
301
+ if (is.null(dockerfile_cmd )) {
302
+ dockerfile_cmd <- sprintf(
303
+ " R -e \" options('shiny.port'=%s,shiny.host='%s',golem.app.prod=%s);library(%4$s);%4$s::run_app()\" " ,
304
+ port ,
305
+ host ,
306
+ set_golem.app.prod ,
307
+ get_golem_name(
308
+ golem_wd = golem_wd
309
+ )
310
+ )
311
+ }
312
+ base_dock $ CMD(
313
+ dockerfile_cmd
314
+ )
315
+ base_dock
316
+ base_dock $ write(
317
+ as = file.path(output_dir , " Dockerfile" ),
318
+ append = single_file
319
+ )
319
320
320
- if (! single_file ){
321
- out <- sprintf(
322
- " # use cd to move to the folder containing the Dockerfile
321
+ if (! single_file ) {
322
+ out <- sprintf(
323
+ " # use cd to move to the folder containing the Dockerfile
323
324
docker build -f Dockerfile_base --progress=plain -t %s .
324
325
docker build -f Dockerfile --progress=plain -t %s .
325
326
docker run -p %s:%s %s
0 commit comments