Skip to content

Commit

Permalink
feat: Reduce logging level in sapphire-localnet Docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
abukosek committed Jan 25, 2024
1 parent fce4470 commit 29c114a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion docker/common/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ fi
T_START="$(date +%s)"

notice "Starting oasis-net-runner with ${CYAN}${PARATIME_NAME}${OFF}...\n"
/spinup-oasis-stack.sh --log.level info 2>1 &>/var/log/spinup-oasis-stack.log &
/spinup-oasis-stack.sh --log.level warn 2>1 &>/var/log/spinup-oasis-stack.log &
OASIS_NODE_PID=$!

notice "Starting postgres...\n"
Expand Down
32 changes: 16 additions & 16 deletions docker/sapphire-localnet/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@ RUN cd oasis-web3-gateway && make && strip -S -x oasis-web3-gateway docker/commo
FROM ghcr.io/oasisprotocol/oasis-core-dev:stable-23.0.x AS oasis-core-dev

ENV OASIS_UNSAFE_SKIP_KM_POLICY=1
ENV OASIS_CORE_VERSION=master
ENV OASIS_CLI_VERSION=0.7.1

RUN git clone https://github.com/oasisprotocol/oasis-core.git --branch stable/23.0.x --depth 1 \
RUN git clone https://github.com/oasisprotocol/oasis-core.git --branch ${OASIS_CORE_VERSION} --depth 1 \
&& cd oasis-core/go/ \
&& make oasis-node oasis-net-runner \
&& cd ../../ \
&& cd oasis-core/tests/runtimes/simple-keymanager \
&& cargo build --release \
&& CARGO_PROFILE_RELEASE_LTO=true CARGO_PROFILE_RELEASE_OPT_LEVEL=s CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1 cargo build --release \
&& cd ../../../../ \
&& git clone https://github.com/oasisprotocol/cli.git --branch v${OASIS_CLI_VERSION} --depth 1 \
&& cd cli \
Expand All @@ -24,7 +28,6 @@ RUN apk add --no-cache bash gcompat libseccomp jq binutils \
&& su -c "POSTGRES_USER=postgres POSTGRES_PASSWORD=postgres /usr/local/bin/docker-entrypoint.sh postgres &" postgres

# Docker-specific variables
ENV OASIS_CORE_VERSION=23.0.9
ENV PARATIME_VERSION=0.7.0
ENV PARATIME_NAME=sapphire
ENV GATEWAY__CHAIN_ID=0x5afd
Expand All @@ -38,17 +41,22 @@ ENV OASIS_DEPOSIT=/oasis-deposit
ENV OASIS_WEB3_GATEWAY_CONFIG_FILE=/localnet.yml
ENV PARATIME=/runtime.elf
ENV KEYMANAGER_BINARY=/simple-keymanager
ENV CLI_BINARY=/oasis
ENV OASIS_UNSAFE_SKIP_AVR_VERIFY=1
ENV OASIS_UNSAFE_SKIP_KM_POLICY=1
ENV OASIS_UNSAFE_ALLOW_DEBUG_ENCLAVES=1

ARG VERSION

# oasis-node and oasis-net-runner
COPY --from=oasis-core-dev /oasis-core/go/oasis-node/oasis-node ${OASIS_NODE}
COPY --from=oasis-core-dev /oasis-core/go/oasis-net-runner/oasis-net-runner ${OASIS_NET_RUNNER}

# simple-keymanager
COPY --from=oasis-core-dev /oasis-core/target/release/simple-keymanager ${KEYMANAGER_BINARY}

# cli
COPY --from=oasis-core-dev /cli/oasis /oasis
COPY --from=oasis-core-dev /cli/oasis ${CLI_BINARY}

# oasis-web3-gateway binary, config, spinup-* scripts and staking_genesis.json.
COPY --from=oasis-web3-gateway /go/oasis-web3-gateway/oasis-web3-gateway ${OASIS_WEB3_GATEWAY}
Expand All @@ -57,16 +65,8 @@ COPY docker/common/localnet.yml ${OASIS_WEB3_GATEWAY_CONFIG_FILE}
COPY docker/common/start.sh /
COPY tests/tools/* /

# Configure oasis-node and oasis-net-runner.
RUN wget --quiet "https://github.com/oasisprotocol/oasis-core/releases/download/v${OASIS_CORE_VERSION}/oasis_core_${OASIS_CORE_VERSION}_linux_amd64.tar.gz" \
&& tar xfvz "oasis_core_${OASIS_CORE_VERSION}_linux_amd64.tar.gz" \
&& mkdir -p "$(dirname ${OASIS_NODE})" "$(dirname ${OASIS_NET_RUNNER})" \
&& mv "oasis_core_${OASIS_CORE_VERSION}_linux_amd64/oasis-node" "${OASIS_NODE}" \
&& mv "oasis_core_${OASIS_CORE_VERSION}_linux_amd64/oasis-net-runner" "${OASIS_NET_RUNNER}" \
&& rm "oasis_core_${OASIS_CORE_VERSION}_linux_amd64.tar.gz" \
&& rm -rf "oasis_core_${OASIS_CORE_VERSION}_linux_amd64" \
&& echo "" \
&& echo "Configure the ParaTime." \
# Configure paratime.
RUN echo "Configure the ParaTime." \
&& mkdir -p "$(dirname ${PARATIME})" \
&& wget --quiet "https://github.com/oasisprotocol/${PARATIME_NAME}-paratime/releases/download/v${PARATIME_VERSION}/localnet-${PARATIME_NAME}-paratime.orc" -O "/paratime.orc" \
&& unzip "paratime.orc" \
Expand All @@ -75,15 +75,15 @@ RUN wget --quiet "https://github.com/oasisprotocol/oasis-core/releases/download/
&& echo "" \
&& echo "Write VERSION information." \
&& echo "${VERSION}" > /VERSION \
&& strip -S -x ${OASIS_NET_RUNNER} ${OASIS_NODE} /oasis /simple-keymanager \
&& strip -S -x ${OASIS_NET_RUNNER} ${OASIS_NODE} ${KEYMANAGER_BINARY} ${CLI_BINARY} \
&& echo "" \
&& ls -l / \
&& echo "" \
&& echo "*** Oasis Node:" \
&& ${OASIS_NODE} --version \
&& echo "" \
&& echo "*** Oasis CLI:" \
&& /oasis --version \
&& ${CLI_BINARY} --version \
&& echo ""

# Web3 gateway http and ws ports.
Expand Down

0 comments on commit 29c114a

Please sign in to comment.