Skip to content

Commit f90912e

Browse files
authored
Merge pull request #19 from letsbuilda/sd/docker
try pinning docker image to sha
2 parents 0bd2762 + e915b7b commit f90912e

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

Dockerfile

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
1-
FROM --platform=linux/amd64 python:slim-bullseye
1+
FROM --platform=linux/amd64 python:3.11-slim@sha256:66e41d125c90d679ad69b264ac7b78a3bd27e7510b63ba5987ad42678bbefc32
2+
3+
RUN adduser --disabled-password api
4+
USER api
5+
6+
ENV PATH="${PATH}:/home/api/.local/bin"
27

38
# Set Git SHA environment variable
49
ARG git_sha="development"
510
ENV GIT_SHA=$git_sha
611

7-
COPY . .
12+
WORKDIR /app
13+
COPY pyproject.toml src ./
14+
RUN python -m pip install .
815

9-
RUN pip install .
16+
EXPOSE 8080
1017

1118
CMD ["uvicorn", "api.server:app", "--host", "0.0.0.0", "--port", "8080"]

docs/source/changelog.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
Changelog
55
=========
66

7+
- :release:`1.5.0 <28th February 2023>`
8+
- :feature:`17` Pin the Docker image to a specific SHA-256 digest to help with reproducible builds
9+
710
- :release:`1.4.0 <20th February 2023>`
811
- :feature:`13` Actually add ``GIT_SHA`` to ``Dockerfile``
912

src/api/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""Public API for our projects"""
22

3-
__version__ = "1.4.0"
3+
__version__ = "1.5.0"

0 commit comments

Comments
 (0)