forked from Yakifo/amqtt
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (17 loc) · 868 Bytes
/
Copy pathDockerfile
File metadata and controls
28 lines (17 loc) · 868 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# -- build stage, install dependencies only using `uv`
FROM python:3.13-alpine@sha256:399babc8b49529dabfd9c922f2b5eea81d611e4512e3ed250d75bd2e7683f4b0 AS build
RUN apk add gcc python3-dev musl-dev linux-headers
COPY requirements-build.txt /tmp/requirements-build.txt
RUN pip install --no-cache-dir --require-hashes -r /tmp/requirements-build.txt
WORKDIR /app
COPY . /app
RUN uv pip install --target=/deps .
# -- final image, copy dependencies and amqtt source
FROM python:3.13-alpine@sha256:399babc8b49529dabfd9c922f2b5eea81d611e4512e3ed250d75bd2e7683f4b0
WORKDIR /app
COPY --from=build /deps /usr/local/lib/python3.13/site-packages/
COPY ./amqtt/scripts/default_broker.yaml /app/conf/broker.yaml
EXPOSE 1883
ENV PATH="/usr/local/lib/python3.13/site-packages/bin:$PATH"
# Run `amqtt` when the container launches
CMD ["amqtt", "-c", "/app/conf/broker.yaml"]