Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit 808d233

Browse files
committed
docker deployment example
1 parent 49a2086 commit 808d233

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

examples/example-docker/Dockerfile

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Use Debian stable slim as the base image
2+
FROM debian:stable-slim
3+
4+
# Set working directory
5+
WORKDIR /app
6+
7+
# Install curl, unzip, and numactl, download the file, unzip it, then remove unnecessary packages
8+
RUN apt-get update && \
9+
apt-get install -y curl unzip numactl && \
10+
curl -L "https://github.com/janhq/nitro/releases/download/v0.1.14/nitro-0.1.14-linux-amd64.zip" -o nitro.zip && \
11+
unzip nitro.zip && \
12+
rm nitro.zip && \
13+
apt-get remove --purge -y curl unzip && \
14+
apt-get autoremove -y && \
15+
apt-get clean && \
16+
rm -rf /var/lib/apt/lists/*
17+
18+
# Expose the port
19+
EXPOSE 3928
20+
21+
# Change the permissions of the nitro binary to make it executable
22+
RUN chmod +x /app/nitro/nitro
23+
24+
# Set the command to run the nitro binary with numactl limiting to cores 0-7
25+
ENTRYPOINT ["numactl", "--physcpubind=0-7", "/app/nitro/nitro"]
26+
CMD ["1", "0.0.0.0", "3928"]
27+

0 commit comments

Comments
 (0)