-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
36 lines (22 loc) · 910 Bytes
/
Dockerfile
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
32
33
34
35
36
# this container builds the kilt-parachain binary from source files and the runtime library
# pinned the version to avoid build cache invalidation
FROM paritytech/ci-unified:bullseye-1.70.0 as builder
WORKDIR /build
ARG FEATURES=default
COPY . .
RUN cargo build --locked --release --features $FEATURES
# ===== SECOND STAGE ======
FROM docker.io/library/ubuntu:20.04
LABEL description="This is the 2nd stage: a very small image where we copy the kilt-parachain binary."
ARG NODE_TYPE=kilt-parachain
COPY --from=builder /build/target/release/$NODE_TYPE /usr/local/bin/node-executable
RUN useradd -m -u 1000 -U -s /bin/sh -d /node node && \
mkdir -p /node/.local/share/node && \
chown -R node:node /node/.local && \
ln -s /node/.local/share/node /data
USER node
EXPOSE 30333 9933 9944
VOLUME ["/data"]
COPY ./dev-specs /node/dev-specs
ENTRYPOINT ["/usr/local/bin/node-executable"]
CMD ["--help"]