Skip to content

Commit

Permalink
chore: update docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
aeweda authored and Tommytrg committed Dec 9, 2024
1 parent a16a896 commit 89ee71b
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion docker/bridge/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
FROM witnet/witnet-rust:latest

COPY ./witnet-centralized-ethereum-bridge /
ARG TARGETPLATFORM

# Use a conditional COPY command based on the target platform
COPY witnet-centralized-ethereum-bridge-x86_64-unknown-linux-gnu /
COPY witnet-centralized-ethereum-bridge-aarch64-unknown-linux-gnu /

RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
echo "Current platform linux/amd64"; \
mv /witnet-centralized-ethereum-bridge-x86_64-unknown-linux-gnu /witnet-centralized-ethereum-bridge; \
rm /witnet-centralized-ethereum-bridge-aarch64-unknown-linux-gnu; \
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
echo "Current platform linux/arm64"; \
mv /witnet-centralized-ethereum-bridge-aarch64-unknown-linux-gnu /witnet-centralized-ethereum-bridge; \
rm /witnet-centralized-ethereum-bridge-x86_64-unknown-linux-gnu; \
else \
echo "Unsupported platform: $TARGETPLATFORM"; \
exit 1; \
fi

ENTRYPOINT ["/witnet-centralized-ethereum-bridge", "--env"]

0 comments on commit 89ee71b

Please sign in to comment.