Skip to content

Commit

Permalink
fix: Fix Oasis CLI in sapphire-dev Docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
abukosek committed Dec 6, 2023
1 parent 5c70b7b commit c5d4af6
Showing 1 changed file with 18 additions and 11 deletions.
29 changes: 18 additions & 11 deletions docker/sapphire-dev/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ ENV OASIS_UNSAFE_SKIP_KM_POLICY=1

RUN git clone https://github.com/oasisprotocol/oasis-core.git --branch stable/23.0.x --depth 1 \
&& cd oasis-core/tests/runtimes/simple-keymanager \
&& cargo build --release
&& cargo build --release \
&& cd ../../../../ \
&& git clone https://github.com/oasisprotocol/cli.git --branch master --depth 1 \
&& cd cli \
&& make CGO_ENABLED=0

# Build sapphire-dev
FROM postgres:16-alpine
Expand All @@ -20,7 +24,7 @@ RUN apk add --no-cache bash gcompat libseccomp jq binutils \

# Docker-specific variables
ENV OASIS_CORE_VERSION=23.0.9
ENV OASIS_CLI_VERSION=0.6.0
ENV OASIS_CLI_VERSION=master
ENV PARATIME_VERSION=0.7.0-testnet
ENV PARATIME_NAME=sapphire
ENV GATEWAY__CHAIN_ID=0x5afd
Expand All @@ -43,6 +47,9 @@ ARG VERSION
# simple-keymanager
COPY --from=oasis-core-dev /oasis-core/target/release/simple-keymanager ${KEYMANAGER_BINARY}

# cli
COPY --from=oasis-core-dev /cli/oasis /oasis

# 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}
COPY --from=oasis-web3-gateway /go/oasis-web3-gateway/docker/common/oasis-deposit/oasis-deposit ${OASIS_DEPOSIT}
Expand All @@ -66,18 +73,18 @@ RUN wget --quiet "https://github.com/oasisprotocol/oasis-core/releases/download/
&& chmod a+x "runtime.elf" \
&& rm "paratime.orc" \
&& echo "" \
&& echo "Configure oasis-cli." \
&& wget --quiet "https://github.com/oasisprotocol/cli/releases/download/v${OASIS_CLI_VERSION}/oasis_cli_${OASIS_CLI_VERSION}_linux_amd64.tar.gz" \
&& tar -xvf "/oasis_cli_${OASIS_CLI_VERSION}_linux_amd64.tar.gz" \
&& mv "/oasis_cli_${OASIS_CLI_VERSION}_linux_amd64/oasis" / \
&& rm -rf "/oasis_cli_${OASIS_CLI_VERSION}_linux_amd64/" \
&& rm -rf "/oasis_cli_${OASIS_CLI_VERSION}_linux_amd64.tar.gz" \
&& 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} /oasis /simple-keymanager \
&& echo "" \
&& ls -l / \
&& echo "" \
&& echo "*** Oasis Node:" \
&& ${OASIS_NODE} --version \
&& echo "" \
&& ls -l /
&& echo "*** Oasis CLI:" \
&& /oasis --version \
&& echo ""

# Web3 gateway http and ws ports.
EXPOSE 8545/tcp
Expand Down

0 comments on commit c5d4af6

Please sign in to comment.