I'm trying to install a Bitbucket R package in a Docker image. The command to do this in my Dockerfile is:
RUN --mount=type=secret,id=bitbucket_password . /run/secrets/bitbucket_password && R -e <span>"remotes::install_bitbucket(repo='myorg/afp.model',ref='v0.1.1',auth_user='$BITBUCKET_USER',password='$BITBUCKET_PASSWORD')"</span>
The problem is this package has a dependency on another of our R packages afp.data which I've specified in the Remotes section of the package DESCRIPTION file as:
Remotes:
bitbucket::myorg/afp.data@v0.2.2When I try to build the package I get the following error at the terminal:
Error: Failed to install <span>'afp.model'</span> from Bitbucket:
cannot open URL <span>'https://api.bitbucket.org/2.0/repositories/myorg/afp.data/src/v0.2.2/DESCRIPTION'</span>
I've already passed in my username and password, and I am able to install our other packages that don't have such dependencies, so I'm not sure why it can't open that URL (if it's a permissions issue)?
Installing this package on my local desktop works fine, it's just in the Docker image that's the problem.
Would appreciate any help in troubleshooting this!