-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathContainerfile
More file actions
31 lines (24 loc) · 889 Bytes
/
Containerfile
File metadata and controls
31 lines (24 loc) · 889 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
30
31
FROM docker.io/library/ubuntu:22.04
# show backtraces
ENV RUST_BACKTRACE 1
# install tools and dependencies
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
ca-certificates && \
# apt cleanup
apt-get autoremove -y && \
apt-get clean && \
find /var/lib/apt/lists/ -type f -not -name lock -delete; \
# add user and link ~/.local/share/melodot to /data
useradd -m -u 1000 -U -s /bin/sh -d /melodot melodot && \
mkdir -p /data /melodot/.local/share && \
chown -R melodot:melodot /data && \
ln -s /data /melodot/.local/share/melodot-node
USER melodot
# copy the compiled binary to the container
COPY --chown=melodot:melodot --chmod=774 melodot-node /usr/bin/melodot-node
# check if executable works in this container
RUN /usr/bin/melodot-node --version
# ws_port
EXPOSE 9930 9333 9944 30333 30334
CMD ["/usr/bin/melodot-node"]