Skip to content
This repository was archived by the owner on Dec 10, 2022. It is now read-only.

Commit 0f3b5ae

Browse files
authored
Merge pull request #57 from tox-rs/docker
Add Dockerfile
2 parents 4ba499d + f8e14f3 commit 0f3b5ae

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

Dockerfile

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# build stage
2+
FROM archlinux/base AS builder
3+
4+
# install build dependencies
5+
RUN pacman --noconfirm -Sy \
6+
gcc \
7+
git \
8+
rust \
9+
diffutils \
10+
file \
11+
awk \
12+
make
13+
14+
# copy local files to container
15+
ADD . /tox-node
16+
WORKDIR /tox-node
17+
18+
# build
19+
RUN cargo build --release
20+
21+
# run stage
22+
FROM archlinux/base
23+
24+
COPY --from=builder /tox-node/target/release/tox-node /user/local/
25+
26+
# tox-node uses port of 33445 as default
27+
EXPOSE 33445/tcp
28+
EXPOSE 33445/udp
29+
30+
# add user
31+
RUN useradd tox_node
32+
33+
# change running user
34+
USER tox_node
35+
36+
ENTRYPOINT ["/user/local/tox-node"]
37+
CMD []

0 commit comments

Comments
 (0)