-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
aba5f63
commit 79b93b9
Showing
3 changed files
with
97 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
FROM rust:buster as builder | ||
WORKDIR /app | ||
|
||
RUN rustup default nightly-2022-11-15 && \ | ||
rustup target add wasm32-unknown-unknown --toolchain nightly-2022-11-15 | ||
|
||
RUN apt-get update && \ | ||
apt-get dist-upgrade -y -o Dpkg::Options::="--force-confold" && \ | ||
apt-get install -y cmake pkg-config libssl-dev git clang libclang-dev protobuf-compiler | ||
|
||
|
||
ARG GIT_COMMIT= | ||
ENV GIT_COMMIT=$GIT_COMMIT | ||
ARG BUILD_ARGS | ||
ARG PROFILE=release | ||
|
||
COPY . . | ||
|
||
RUN cargo build --release --features=with-continuum-runtime | ||
|
||
# ============= | ||
|
||
FROM phusion/baseimage:focal-1.2.0 | ||
LABEL maintainer="[email protected]" | ||
|
||
ARG PROFILE | ||
|
||
RUN useradd -m -u 1000 -U -s /bin/sh -d /metaverse metaverse | ||
|
||
COPY --from=builder /app/target/release/metaverse-node /usr/local/bin | ||
|
||
# checks | ||
RUN ldd /usr/local/bin/metaverse-node && \ | ||
/usr/local/bin/metaverse-node --version | ||
|
||
# Shrinking | ||
RUN rm -rf /usr/lib/python* && \ | ||
rm -rf /usr/sbin /usr/share/man | ||
|
||
USER metaverse | ||
EXPOSE 30333 9933 9944 | ||
|
||
RUN mkdir /metaverse/data | ||
|
||
VOLUME ["/metaverse/data"] | ||
|
||
ENTRYPOINT ["/usr/local/bin/metaverse-node"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
VERSION=$(git rev-parse --short HEAD) | ||
|
||
echo $VERSION | ||
|
||
docker build -f scripts/Dockerfile_continuum . -t bitcountry/continuum-parachain-node:$VERSION --no-cache --build-arg GIT_COMMIT=${VERSION} | ||
docker push bitcountry/continuum-parachain-node:$VERSION |