Reputation: 974
I have built an image myimage
with Docker using the following Dockerfile:
FROM python:3.7
RUN pip install flake8
and then running
docker build -t myimage .
.
Now, if I run
flake8 src
in the terminal (in a conda environment where I have flake8 installed), then I get a few warnings. But if I run
docker run myimage flake8 src
then I get no output!
What is the correct way to run flake8 within a docker container so that I can see the output?
Upvotes: 2
Views: 2175
Reputation: 974
Turns out I needed to use the -v
flag to mount the local volume.
docker run -v $(pwd)/src:/src myimage flake8 src
This works as expected
Upvotes: 0