Inside a docker I am building another docker and trying to share the ssh key. And when building the docker do not have this problem sometimes SSH Permissions not working on CircleCI v2.0
Dokerfile
FROM node:8.9
WORKDIR /tmp
COPY .ssh .ssh
WORKDIR /
RUN cp -r /tmp/.ssh ~/.ssh
RUN eval "$(ssh-agent -s)"
RUN rm -rf /tmp
RUN mkdir /app
ADD . /app
WORKDIR /app
RUN yarn install
RUN yarn build
CMD ["yarn", "start"]
When I try it, it gives me this problem.
COPY failed: stat /var/lib/docker/tmp/docker-builder225467840/.ssh: no such file or directory
Assuming it’s the COPY .ssh .ssh line that is causing the problem, do you have a file/folder called .ssh in your working directory in the build container?
What image are you using for your build container? I take it you are using the Docker executor under 2.0?
“Assuming it’s the COPY .ssh .ssh line that is causing the problem, do you have a file/folder called .ssh in your working directory in the build container?”
yes
“What image are you using for your build container?”