Skip to content

Commit 4e965a7

Browse files
committed
Dockerfile fixes/improvements:
* Remove `scripts` dir from install stage (no longer exists) * Add `--no-cache-dir` to `pip install` to save a small amount of image space * Pass `--fail` to the `curl` healthcheck so that it actually does something
1 parent 6c8db6a commit 4e965a7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ COPY --from=npm-install /staging /staging
2222
WORKDIR /staging
2323

2424
RUN --mount=type=cache,target=/root/.cache <<EOS sh -ex
25-
pip install uv
25+
pip install --no-cache-dir uv
2626
uv sync --no-install-project
2727
TMP=/dev/shm uv run pytest
2828
uv sync --no-install-project --no-group dev
29-
mv LICENSE scripts silicon /silicon
29+
mv LICENSE silicon /silicon
3030
mv entrypoint.sh /
3131
EOS
3232

@@ -55,6 +55,6 @@ WORKDIR /silicon
5555

5656
EXPOSE 5000
5757
HEALTHCHECK --start-period=10s --timeout=5s \
58-
CMD curl http://localhost:5000/view/home || exit 1
58+
CMD curl --fail http://localhost:5000/view/home || exit 1
5959
ENTRYPOINT ["/usr/bin/tini", "--", "/entrypoint.sh"]
6060
CMD ["/silicon/.venv/bin/gunicorn", "--worker-tmp-dir /dev/shm", "'silicon:create_app()'"]

0 commit comments

Comments
 (0)