Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

105
Vistas
Custom R Source package in Docker

InfrastructureR_0.1.4.tar.gz is a R source package that I created using RStudio in windows and it works fine. But when I try to use it in docker file with the command InfrastructureR_0.1.4.tar.gz is located in the same location as Docker file

Docker is running on ubuntu 18.x machine

RUN R -e "install.packages('InfrastructureR_0.1.4.tar.gz', dependencies=FALSE, verbose=TRUE, repos=NULL, type='source')" it doesn't install.

I run the docker build by sudo docker build -t myRApp s . and I get the following error message

Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
system (cmd0): /usr/lib/R/bin/R CMD INSTALL
Warning: invalid package ‘InfrastructureR_0.1.4.tar.gz’
Error: ERROR: no packages specified
Warning message:
In install.packages("InfrastructureR_0.1.4.tar.gz", dependencies = FALSE,  :
  installation of package ‘InfrastructureR_0.1.4.tar.gz’ had non-zero exit status

So how do I install a custom R source package in Docker

over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

It is not enough to have your tar.gz file in the same directory as your Dockerfile. To make a local file available to a Docker container created from an image, you can use the COPY instruction.

The COPY instruction copies new files or directories from <src> and adds them to the filesystem of the container at the path <dest>:

COPY [--chown=<user>:<group>] <src>... <dest> 

More in the docker docs:

  • https://docs.docker.com/engine/reference/builder/#copy
over 4 years ago · Santiago Trujillo Denunciar

0

I think the package needs to be copied inside the container so that the container can access it. (or in a location volume that docker has access to)

R running inside the container cannot find the file.

https://www.digitalocean.com/community/tutorials/how-to-share-data-between-the-docker-container-and-the-host

https://docs.docker.com/storage/bind-mounts/

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda