-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathDockerfile
28 lines (22 loc) · 871 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
FROM docker.io/paritytech/ci-linux:production as builder
WORKDIR /substrate
COPY . /substrate
RUN cargo build --release --locked
FROM docker.io/library/ubuntu:20.04
LABEL description="Docker image for Fair Squares Node Software" \
image.source="https://github.com/Fair-Squares/fair-squares" \
image.authors="[email protected]" \
image.documentation="https://github.com/Fair-Squares/fair-squares" \
image.vendor="Fair Squares"
COPY --from=builder /substrate/target/release/fs-node /usr/local/bin
RUN useradd -m -u 1000 -U -s /bin/sh -d /fs fs && \
mkdir -p /data /fs/.local/share && \
chown -R fs:fs /data && \
ln -s /data /fs/.local/share/fs-node && \
rm -rf /usr/bin /usr/sbin \
# check if executable works in this container
/usr/local/bin/fs-node --version
USER fs
EXPOSE 30333 9933 9944 9615
VOLUME ["/chain-data"]
CMD ["/usr/local/bin/fs-node"]