I am writing a Docker container with R. For the dockerfile composition, I use VScode and its extension. At the moment I can run the container exactly as I wanted it, however, when I push the dockerfile to Github and from there triggers a build in dockerhub, I notice the following problem:
Dockerfile:
FROM nvidia/cuda:11.2.2-base-ubuntu20.04
# Install dependencies
RUN apt-get update && apt-get install -y \
curl \
ca-certificates \
dumb-init \
htop \
sudo \
gcc \
bzip2 \
libx11-6 \
locales \
man \
git \
procps \
openssh-client \
lsb-release \
&& rm -rf /var/lib/apt/lists/*
COPY installers /installers
COPY entrypoint.sh /usr/bin/entrypoint.sh
RUN /installers/install_R.sh
COPY run_simple.sh /usr/run_simple.sh
CMD ["bash","/usr/run_simple.sh"]
The error:
...
...
[91m/bin/sh: 1: /installers/install_R.sh: Permission denied
[0m
Removing intermediate container 1ea9ba9d9d2b
The command '/bin/sh -c /installers/install_R.sh' returned a non-zero code: 126
Apparently, the builder cannot access the copied files. So, if I run the file as RUN chmod +x /installers/install_R.sh
, then, there is no installing problem. However, when I launch the container, then I cannot see anywhere R as if it would not be installed. That made me think it could have been installed for another user? or for a user that is not the same as the one running the container? or maybe is not installed at all?
If you could help me solving this issue, it would be highly appreciated.