Skip to content

Commit

Permalink
Updated Dockerfile to build cleanly and doc. (#2154)
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasRouquette authored Oct 19, 2021
1 parent fa318ee commit 24054d8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.history
secrets.json
*.egg-info
.idea
Expand Down
9 changes: 4 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.7-stretch as base
FROM python:3.9-bullseye as base

# Get the latest spec-data, then cache it so we don't have to redo this on every rebuild
from base as specdata
Expand All @@ -8,14 +8,12 @@ RUN git clone --depth=1 --branch=master https://github.com/tabatkins/bikeshed.gi
RUN pip install --editable /bikeshed-master
RUN bikeshed update


FROM base as builder
RUN mkdir /install
WORKDIR /install

COPY requirements.txt /requirements.txt
RUN pip install --install-option="--prefix=/install" -r /requirements.txt

RUN pip install --prefix=/install -r /requirements.txt

FROM base
RUN mkdir -p /app/bikeshed
Expand All @@ -24,7 +22,8 @@ WORKDIR /app
COPY --from=builder /install /usr/local
COPY --from=specdata /bikeshed-master/bikeshed/spec-data /app/bikeshed/spec-data

COPY setup.py /app/
# setup.py opens README.md, semver.txt and requirements.txt so they must be copied.
COPY setup.py README.md semver.txt requirements.txt /app/
RUN pip install --editable .

COPY .git /app/.git
Expand Down
2 changes: 1 addition & 1 deletion docs/index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ Example for a Unix host:
Example for a Windows host:

```
docker run --rm --volume C:\mystuff\project1\:\data bikeshed spec \data\Index.bs \data\out\Index.html
docker run --rm --volume C:\mystuff\project1\:/data <organization>/bikeshed:<date> spec /data/Index.bs /data/out/Index.html
```

Note that the [[#cli-options]] apply to running Bikeshed from a docker image.
Expand Down

0 comments on commit 24054d8

Please sign in to comment.