Publish minimal Solana docker images to dockerhub
This commit is contained in:
@ -2,3 +2,6 @@ steps:
|
|||||||
- command: "ci/snap.sh"
|
- command: "ci/snap.sh"
|
||||||
timeout_in_minutes: 40
|
timeout_in_minutes: 40
|
||||||
name: "snap [public]"
|
name: "snap [public]"
|
||||||
|
- command: "ci/docker-solana/build.sh"
|
||||||
|
timeout_in_minutes: 20
|
||||||
|
name: "docker-solana"
|
||||||
|
1
ci/docker-solana/.gitignore
vendored
Normal file
1
ci/docker-solana/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
cargo-install/
|
5
ci/docker-solana/Dockerfile
Normal file
5
ci/docker-solana/Dockerfile
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
FROM debian:stretch
|
||||||
|
RUN apt update && \
|
||||||
|
apt-get install -y libssl-dev && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
COPY cargo-install/bin /usr/bin/
|
5
ci/docker-solana/README.md
Normal file
5
ci/docker-solana/README.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
## Minimal Solana Docker image
|
||||||
|
|
||||||
|
This image is automatically updated by CI
|
||||||
|
|
||||||
|
https://hub.docker.com/r/solanalabs/solana/
|
37
ci/docker-solana/build.sh
Executable file
37
ci/docker-solana/build.sh
Executable file
@ -0,0 +1,37 @@
|
|||||||
|
#!/bin/bash -ex
|
||||||
|
|
||||||
|
cd "$(dirname "$0")"
|
||||||
|
eval "$(../channel-info.sh)"
|
||||||
|
|
||||||
|
if [[ $BUILDKITE_BRANCH = "$STABLE_CHANNEL" ]]; then
|
||||||
|
CHANNEL=stable
|
||||||
|
elif [[ $BUILDKITE_BRANCH = "$EDGE_CHANNEL" ]]; then
|
||||||
|
CHANNEL=edge
|
||||||
|
elif [[ $BUILDKITE_BRANCH = "$BETA_CHANNEL" ]]; then
|
||||||
|
CHANNEL=beta
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z $CHANNEL ]]; then
|
||||||
|
echo Unable to determine channel to publish into, exiting.
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -rf cargo-install/
|
||||||
|
../docker-run.sh solanalabs/rust:1.29.1 \
|
||||||
|
cargo install --path . --root ci/docker-solana/cargo-install
|
||||||
|
|
||||||
|
docker build -t solanalabs/solana:$CHANNEL .
|
||||||
|
|
||||||
|
maybeEcho=
|
||||||
|
if [[ -z $CI ]]; then
|
||||||
|
echo "Not CI, skipping |docker push|"
|
||||||
|
maybeEcho="echo"
|
||||||
|
else
|
||||||
|
(
|
||||||
|
set +x
|
||||||
|
if [[ -n $DOCKER_PASSWORD && -n $DOCKER_USERNAME ]]; then
|
||||||
|
echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin
|
||||||
|
fi
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
$maybeEcho docker push solanalabs/solana:$CHANNEL
|
Reference in New Issue
Block a user