forked from galacticcouncil/hydration-node
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
26 lines (18 loc) · 666 Bytes
/
Dockerfile
File metadata and controls
26 lines (18 loc) · 666 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
FROM rust:latest as builder
RUN apt update && apt install -y git clang curl libssl-dev llvm libudev-dev
WORKDIR /build
COPY . /build
RUN cargo build --release
FROM debian:buster-slim
LABEL org.opencontainers.image.source = "https://github.com/galacticcouncil/HydraDX-node"
COPY --from=builder /build/target/release/hydra-dx /usr/local/bin
RUN useradd -m -u 1000 -U -s /bin/sh -d /hydra hydra && \
mkdir -p /hydra/.local/share && \
mkdir /data && \
chown -R hydra:hydra /data && \
ln -s /data /hydra/.local/share/hydra-dx && \
rm -rf /usr/bin /usr/sbin
USER hydra
EXPOSE 30333 9933 9944
VOLUME ["/data"]
CMD ["/usr/local/bin/hydra-dx","--chain","lerna"]