I run Ubuntu 16.04 and I have installed docker via a snap package. docker build
is unable to access my Dockerfile
, which sets in a sub-directory of ~
.
The snap interface appears to be properly connected...
$ snap interfaces
Slot Plug
...
:home docker
...
However, when I call docker build
(from the directory containing Dockerfile
), I get the following error...
$ sudo docker build . -t serial-wiring.base
unable to prepare context: unable to evaluate symlinks in context path: lstat /home/<username>/Documents: permission denied
I am new to Docker, is there something I'm missing?
Here are the contents of the Dockerfile:
# Base Image
FROM ubuntu
# Add Required Packages [Layer 1]
RUN apt update && \
apt install -y ca-certificates cmake g++ git make --no-install-recommends
# Download Sources [Layer 2]
RUN cd ~ && \
git clone https://github.com/remote-wiring/serial-wiring.git && \
cd serial-wiring/ && \
mkdir build
# Verify Build and Install
CMD cd ~/serial-wiring/build/ && \
cmake .. && \
make
NOTE: I have confirmed
docker build . -t serial-wiring.base
works using this Dockerfile on Windows.