forked from DavidBuchanan314/millipds
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmillipds_dev.dockerfile
More file actions
29 lines (20 loc) · 826 Bytes
/
Copy pathmillipds_dev.dockerfile
File metadata and controls
29 lines (20 loc) · 826 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
29
# syntax=docker/dockerfile:1
FROM python:3.12-slim-bookworm
# needed for native module build (won't be needed if/when I get wheels in pypi)
RUN apt update && apt install -y gcc git
# create low-priv user (no need to mess with groups since we won't use UNIX domain sockets)
RUN adduser --system --shell /bin/false --home /opt/millipds millipds
WORKDIR /opt/millipds
# copy in the src and drop its privs
COPY . src/
RUN chown -R millipds src/
# install, under the low-priv user
USER millipds
RUN python3 -m pip install -v src/
# init the db with dev presets
RUN python3 -m millipds init millipds.test --dev
# create a test user
RUN python3 -m millipds account create bob.test did:web:bob.test --unsafe_password=hunter2
# do the thing
CMD python3 -m millipds run --listen_host=0.0.0.0 --listen_port=8123
EXPOSE 8123/tcp