Skip to content

Commit

Permalink
Add black Dockerfile
Browse files Browse the repository at this point in the history
- Build a `black` container based on python3-slim
- Test: `docker build --network-host --tag black .`
```console
cooper-mbp1:black cooper$ docker image ls
REPOSITORY                                         TAG            IMAGE ID       CREATED              SIZE
black                                              latest         0c7636402ac2   4 seconds ago        332MB
```

Addresses part of #1914
  • Loading branch information
cooperlees committed Apr 3, 2021
1 parent 201b331 commit 9cce240
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Dockerfile
@@ -0,0 +1,10 @@
FROM python:3-slim

RUN pip install --upgrade pip setuptools wheel
RUN apt update && apt install -y git
RUN mkdir /src
COPY . /src/
RUN cd /src && pip install --no-cache-dir .
RUN rm -rf /src && apt remove -y git && apt autoremove -y

CMD ["black"]

0 comments on commit 9cce240

Please sign in to comment.