Skip to content

Commit 168c631

Browse files
authored
Add tini to server Docker images (#3357)
Closes: #3302
1 parent 69c05b1 commit 168c631

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

docker/server/entrypoint.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ fi
1010
DB_PATH="${HOME}/.dstack/server/data/sqlite.db"
1111
mkdir -p "$(dirname "$DB_PATH")"
1212
if [[ -z "${LITESTREAM_REPLICA_URL}" ]]; then
13-
dstack server --host 0.0.0.0
13+
exec dstack server --host 0.0.0.0
1414
else
1515
if [[ ! -f "$DB_PATH" ]]; then
1616
echo "Attempting Litestream restore..."
@@ -23,5 +23,5 @@ else
2323
fi
2424
fi
2525
fi
26-
litestream replicate -exec "dstack server --host 0.0.0.0" "$DB_PATH" "$LITESTREAM_REPLICA_URL"
26+
exec litestream replicate -exec "dstack server --host 0.0.0.0" "$DB_PATH" "$LITESTREAM_REPLICA_URL"
2727
fi

docker/server/release/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ RUN apt-get update && apt-get install -y \
1111
curl \
1212
git \
1313
sqlite3 \
14+
tini \
1415
&& rm -rf /var/lib/apt/lists/*
1516

1617
RUN if [ $(uname -m) = "aarch64" ]; then ARCH="arm64"; else ARCH="x86_64"; fi && \
@@ -19,7 +20,7 @@ RUN if [ $(uname -m) = "aarch64" ]; then ARCH="arm64"; else ARCH="x86_64"; fi &&
1920

2021
ADD https://astral.sh/uv/install.sh /uv-installer.sh
2122
RUN sh /uv-installer.sh && rm /uv-installer.sh
22-
ENV PATH="/root/.local/bin/:$PATH"
23+
ENV PATH="/root/.local/bin/:$PATH"
2324

2425
RUN uv tool install "dstack[all]==$VERSION"
2526

@@ -28,4 +29,4 @@ RUN chmod 777 entrypoint.sh
2829

2930
EXPOSE 3000
3031

31-
ENTRYPOINT ["./entrypoint.sh"]
32+
ENTRYPOINT ["/usr/bin/tini", "--", "./entrypoint.sh"]

docker/server/stgn/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ RUN apt-get update && apt-get install -y \
99
curl \
1010
git \
1111
sqlite3 \
12+
tini \
1213
&& rm -rf /var/lib/apt/lists/*
1314

1415
RUN if [ $(uname -m) = "aarch64" ]; then ARCH="arm64"; else ARCH="x86_64"; fi && \
@@ -28,4 +29,4 @@ RUN chmod 777 entrypoint.sh
2829

2930
EXPOSE 3000
3031

31-
ENTRYPOINT ["./entrypoint.sh"]
32+
ENTRYPOINT ["/usr/bin/tini", "--", "./entrypoint.sh"]

0 commit comments

Comments
 (0)