Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
# A container for the core semantic-search capability.
#
######################################################
FROM python:3.13-alpine3.22
FROM dhi.io/python:3.13-alpine3.22-dev AS builder

ENV USER=dug

# Install required packages
RUN apk update && \
Expand All @@ -14,7 +15,6 @@ RUN apk upgrade -Ua

RUN pip install --upgrade pip
# Create a non-root user.
ENV USER=dug
ENV HOME=/home/$USER
ENV UID=1000

Expand All @@ -33,5 +33,19 @@ WORKDIR $HOME/dug
RUN make install
RUN make install.dug

FROM dhi.io/python:3.13-alpine3.22

ENV USER=dug
ENV HOME=/home/$USER

COPY --from=builder /opt/python /opt/python
COPY --from=builder /etc/passwd /etc/passwd
COPY --from=builder /etc/shadow /etc/shadow

USER $USER
COPY --chown=$USER --from=builder $HOME $HOME

WORKDIR $HOME/dug

# Run it
ENTRYPOINT dug
ENTRYPOINT ["dug"]
2 changes: 1 addition & 1 deletion debug.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
source .env
export $(cut -d= -f1 .env)
export ELASTIC_API_HOST=localhost
export REDIS_HOST=localhost
export REDIS_HOST=localhost
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ services:
PYTHONUNBUFFERED: "TRUE"
entrypoint:
[
"uvicorn",
"/home/dug/.local/bin/uvicorn",
"--host",
"0.0.0.0",
"--port",
Expand Down