ci: (re)move dockerfiles
This commit is contained in:
parent
bc3c1117a4
commit
e18270f33e
@ -1,40 +0,0 @@
|
||||
## Usage
|
||||
|
||||
```docker build -f docker/ubuntu/Dockerfile --tag ethcore/parity:branch_or_tag_name .```
|
||||
|
||||
## Usage - CentOS
|
||||
|
||||
Builds a lightweight non-root Parity docker image:
|
||||
```
|
||||
git clone https://github.com/paritytech/parity-ethereum.git
|
||||
cd parity-ethereum
|
||||
./docker/centos/build.sh
|
||||
```
|
||||
|
||||
Fully customised build:
|
||||
```
|
||||
PARITY_IMAGE_REPO=my-personal/parity \
|
||||
PARITY_BUILDER_IMAGE_TAG=build-latest \
|
||||
PARITY_RUNNER_IMAGE_TAG=centos-parity-experimental \
|
||||
./docker/centos/build.sh
|
||||
```
|
||||
|
||||
Default values:
|
||||
```
|
||||
# The image name
|
||||
PARITY_IMAGE_REPO - parity/parity
|
||||
|
||||
# The tag to be used for builder image, git commit sha will be appended
|
||||
PARITY_BUILDER_IMAGE_TAG - build
|
||||
|
||||
# The tag to be used for runner image
|
||||
PARITY_RUNNER_IMAGE_TAG - latest
|
||||
```
|
||||
|
||||
All default ports you might use will be exposed:
|
||||
```
|
||||
# secret
|
||||
# ipfs store ui rpc ws listener discovery
|
||||
# ↓ ↓ ↓ ↓ ↓ ↓ ↓
|
||||
EXPOSE 5001 8082 8083 8180 8545 8546 30303/tcp 30303/udp
|
||||
```
|
@ -1,43 +0,0 @@
|
||||
FROM alpine:edge AS builder
|
||||
|
||||
# show backtraces
|
||||
ENV RUST_BACKTRACE 1
|
||||
|
||||
RUN apk add --no-cache \
|
||||
build-base \
|
||||
cargo \
|
||||
cmake \
|
||||
eudev-dev \
|
||||
linux-headers \
|
||||
perl \
|
||||
rust
|
||||
|
||||
WORKDIR /parity
|
||||
COPY . /parity
|
||||
RUN cargo build --release --target x86_64-alpine-linux-musl --verbose
|
||||
RUN strip target/x86_64-alpine-linux-musl/release/parity
|
||||
|
||||
|
||||
FROM alpine:edge
|
||||
|
||||
# show backtraces
|
||||
ENV RUST_BACKTRACE 1
|
||||
|
||||
RUN apk add --no-cache \
|
||||
libstdc++ \
|
||||
eudev-libs \
|
||||
libgcc
|
||||
|
||||
RUN addgroup -g 1000 parity \
|
||||
&& adduser -u 1000 -G parity -s /bin/sh -D parity
|
||||
|
||||
USER parity
|
||||
|
||||
EXPOSE 8080 8545 8180
|
||||
|
||||
WORKDIR /home/parity
|
||||
|
||||
RUN mkdir -p /home/parity/.local/share/io.parity.ethereum/
|
||||
COPY --chown=parity:parity --from=builder /parity/target/x86_64-alpine-linux-musl/release/parity ./
|
||||
|
||||
ENTRYPOINT ["./parity"]
|
@ -1,28 +0,0 @@
|
||||
FROM centos:latest
|
||||
|
||||
RUN mkdir -p /opt/parity/data && \
|
||||
chmod g+rwX /opt/parity/data && \
|
||||
mkdir -p /opt/parity/release
|
||||
|
||||
COPY parity/parity /opt/parity/release
|
||||
|
||||
WORKDIR /opt/parity/data
|
||||
|
||||
# exposing default ports
|
||||
#
|
||||
# secret
|
||||
# ipfs store ui rpc ws listener discovery
|
||||
# ↓ ↓ ↓ ↓ ↓ ↓ ↓
|
||||
EXPOSE 5001 8082 8083 8180 8545 8546 30303/tcp 30303/udp
|
||||
|
||||
# switch to non-root user
|
||||
USER 1001
|
||||
|
||||
#if no base path provided, assume it's current workdir
|
||||
CMD ["--base-path","."]
|
||||
ENTRYPOINT ["/opt/parity/release/parity"]
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,25 +0,0 @@
|
||||
FROM centos:latest
|
||||
|
||||
WORKDIR /build
|
||||
|
||||
ADD . /build/parity-ethereum
|
||||
|
||||
RUN yum -y update && \
|
||||
yum install -y systemd-devel git make gcc-c++ gcc file binutils && \
|
||||
curl -L "https://cmake.org/files/v3.12/cmake-3.12.0-Linux-x86_64.tar.gz" -o cmake.tar.gz && \
|
||||
tar -xzf cmake.tar.gz && \
|
||||
cp -r cmake-3.12.0-Linux-x86_64/* /usr/ && \
|
||||
curl https://sh.rustup.rs -sSf | sh -s -- -y && \
|
||||
PATH=/root/.cargo/bin:$PATH && \
|
||||
RUST_BACKTRACE=1 && \
|
||||
rustc -vV && \
|
||||
cargo -V && \
|
||||
gcc -v && \
|
||||
g++ -v && \
|
||||
cmake --version && \
|
||||
cd parity-ethereum && \
|
||||
cargo build --verbose --release --features final && \
|
||||
strip /build/parity-ethereum/target/release/parity && \
|
||||
file /build/parity-ethereum/target/release/parity
|
||||
|
||||
|
@ -1,29 +0,0 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# The image name
|
||||
PARITY_IMAGE_REPO=${PARITY_IMAGE_REPO:-parity/parity}
|
||||
# The tag to be used for builder image
|
||||
PARITY_BUILDER_IMAGE_TAG=${PARITY_BUILDER_IMAGE_TAG:-build}
|
||||
# The tag to be used for runner image
|
||||
PARITY_RUNNER_IMAGE_TAG=${PARITY_RUNNER_IMAGE_TAG:-latest}
|
||||
|
||||
echo Building $PARITY_IMAGE_REPO:$PARITY_BUILDER_IMAGE_TAG-$(git log -1 --format="%H")
|
||||
docker build --no-cache -t $PARITY_IMAGE_REPO:$PARITY_BUILDER_IMAGE_TAG-$(git log -1 --format="%H") . -f docker/centos/Dockerfile.build
|
||||
|
||||
echo Creating $PARITY_BUILDER_IMAGE_TAG-$(git log -1 --format="%H"), extracting binary
|
||||
docker create --name extract $PARITY_IMAGE_REPO:$PARITY_BUILDER_IMAGE_TAG-$(git log -1 --format="%H")
|
||||
mkdir docker/centos/parity
|
||||
docker cp extract:/build/parity-ethereum/target/release/parity docker/centos/parity
|
||||
|
||||
echo Building $PARITY_IMAGE_REPO:$PARITY_RUNNER_IMAGE_TAG
|
||||
docker build --no-cache -t $PARITY_IMAGE_REPO:$PARITY_RUNNER_IMAGE_TAG docker/centos/ -f docker/centos/Dockerfile
|
||||
|
||||
echo Cleaning up ...
|
||||
rm -rf docker/centos/parity
|
||||
docker rm -f extract
|
||||
docker rmi -f $PARITY_IMAGE_REPO:$PARITY_BUILDER_IMAGE_TAG-$(git log -1 --format="%H")
|
||||
|
||||
echo Echoing Parity version:
|
||||
docker run $PARITY_IMAGE_REPO:$PARITY_RUNNER_IMAGE_TAG --version
|
||||
|
||||
echo Done.
|
@ -1,45 +0,0 @@
|
||||
FROM ubuntu:14.04
|
||||
WORKDIR /build
|
||||
|
||||
# install tools and dependencies
|
||||
RUN apt-get -y update && \
|
||||
apt-get install -y --force-yes --no-install-recommends \
|
||||
curl git make g++ gcc-aarch64-linux-gnu g++-aarch64-linux-gnu \
|
||||
libc6-arm64-cross libc6-dev-arm64-cross wget file ca-certificates \
|
||||
binutils-aarch64-linux-gnu cmake3 libudev-dev \
|
||||
&& \
|
||||
apt-get clean
|
||||
|
||||
# install rustup
|
||||
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
|
||||
|
||||
# rustup directory
|
||||
ENV PATH /root/.cargo/bin:$PATH
|
||||
|
||||
ENV RUST_TARGETS="aarch64-unknown-linux-gnu"
|
||||
|
||||
# multirust add arm--linux-gnuabhf toolchain
|
||||
RUN rustup target add aarch64-unknown-linux-gnu
|
||||
|
||||
# show backtraces
|
||||
ENV RUST_BACKTRACE 1
|
||||
|
||||
# show tools
|
||||
RUN rustc -vV && cargo -V
|
||||
|
||||
# build parity
|
||||
ADD . /build/parity
|
||||
RUN cd parity && \
|
||||
mkdir -p .cargo && \
|
||||
echo '[target.aarch64-unknown-linux-gnu]\n\
|
||||
linker = "aarch64-linux-gnu-gcc"\n'\
|
||||
>>.cargo/config && \
|
||||
cat .cargo/config && \
|
||||
cargo build --target aarch64-unknown-linux-gnu --release --verbose && \
|
||||
ls /build/parity/target/aarch64-unknown-linux-gnu/release/parity && \
|
||||
/usr/bin/aarch64-linux-gnu-strip /build/parity/target/aarch64-unknown-linux-gnu/release/parity
|
||||
|
||||
RUN file /build/parity/target/aarch64-unknown-linux-gnu/release/parity
|
||||
|
||||
EXPOSE 8080 8545 8180
|
||||
ENTRYPOINT ["/build/parity/target/aarch64-unknown-linux-gnu/release/parity"]
|
@ -1,45 +0,0 @@
|
||||
FROM ubuntu:14.04
|
||||
WORKDIR /build
|
||||
|
||||
# install tools and dependencies
|
||||
RUN apt-get -y update && \
|
||||
apt-get install -y --force-yes --no-install-recommends \
|
||||
curl git make g++ gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf \
|
||||
libc6-dev-armhf-cross wget file ca-certificates \
|
||||
binutils-arm-linux-gnueabihf cmake3 libudev-dev \
|
||||
&& \
|
||||
apt-get clean
|
||||
|
||||
# install rustup
|
||||
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
|
||||
|
||||
# rustup directory
|
||||
ENV PATH /root/.cargo/bin:$PATH
|
||||
|
||||
ENV RUST_TARGETS="arm-unknown-linux-gnueabihf"
|
||||
|
||||
# multirust add arm--linux-gnuabhf toolchain
|
||||
RUN rustup target add armv7-unknown-linux-gnueabihf
|
||||
|
||||
# show backtraces
|
||||
ENV RUST_BACKTRACE 1
|
||||
|
||||
# show tools
|
||||
RUN rustc -vV && cargo -V
|
||||
|
||||
# build parity
|
||||
ADD . /build/parity
|
||||
RUN cd parity && \
|
||||
mkdir -p .cargo && \
|
||||
echo '[target.armv7-unknown-linux-gnueabihf]\n\
|
||||
linker = "arm-linux-gnueabihf-gcc"\n'\
|
||||
>>.cargo/config && \
|
||||
cat .cargo/config && \
|
||||
cargo build --target armv7-unknown-linux-gnueabihf --release --verbose && \
|
||||
ls /build/parity/target/armv7-unknown-linux-gnueabihf/release/parity && \
|
||||
/usr/bin/arm-linux-gnueabihf-strip /build/parity/target/armv7-unknown-linux-gnueabihf/release/parity
|
||||
|
||||
RUN file /build/parity/target/armv7-unknown-linux-gnueabihf/release/parity
|
||||
|
||||
EXPOSE 8080 8545 8180
|
||||
ENTRYPOINT ["/build/parity/target/armv7-unknown-linux-gnueabihf/release/parity"]
|
@ -17,6 +17,6 @@ export DOCKER_TARGET=$1
|
||||
echo $DOCKER_TARGET
|
||||
|
||||
echo "__________Docker build and push__________"
|
||||
docker build --build-arg TARGET=$DOCKER_TARGET --no-cache=true --tag parity/$DOCKER_TARGET:$DOCKER_BUILD_TAG -f docker/hub/Dockerfile .
|
||||
docker build --build-arg TARGET=$DOCKER_TARGET --no-cache=true --tag parity/$DOCKER_TARGET:$DOCKER_BUILD_TAG -f scripts/gitlab/hub-docker.file .
|
||||
docker push parity/$DOCKER_TARGET:$DOCKER_BUILD_TAG
|
||||
docker logout
|
||||
|
Loading…
Reference in New Issue
Block a user