diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 000000000..a8095795a --- /dev/null +++ b/.dockerignore @@ -0,0 +1,22 @@ +# Generated by Cargo +# will have compiled files and executables +target + +*.swp +*.swo +*.swn +*.DS_Store + +# Visual Studio Code stuff +.vscode + +# GitEye stuff +.project + +# idea ide +.idea + +# git stuff +.git + +ethcore/res/ethereum/tests diff --git a/docker/README.md b/docker/README.md new file mode 100644 index 000000000..3b79e8dd7 --- /dev/null +++ b/docker/README.md @@ -0,0 +1,3 @@ +Usage + +```docker build -f docker/ubuntu/Dockerfile --tag ethcore/parity:branch_or_tag_name .``` diff --git a/docker/centos/Dockerfile b/docker/centos/Dockerfile index a4b98e9d6..747a227c9 100644 --- a/docker/centos/Dockerfile +++ b/docker/centos/Dockerfile @@ -1,29 +1,32 @@ FROM centos:latest WORKDIR /build + # install tools and dependencies RUN yum -y update&& \ yum install -y git make gcc-c++ gcc file binutils + # install rustup RUN curl -sSf https://static.rust-lang.org/rustup.sh -o rustup.sh &&\ ls&&\ sh rustup.sh --disable-sudo + # show backtraces ENV RUST_BACKTRACE 1 + # set compiler ENV CXX g++ ENV CC gcc + # show tools RUN rustc -vV && \ cargo -V && \ gcc -v &&\ g++ -v + # build parity -RUN git clone https://github.com/paritytech/parity && \ - cd parity&&\ - git checkout beta && \ - git pull && \ - ls -a&&\ - cargo build --release --verbose && \ +ADD . /build/parity +RUN cd parity&&\ + cargo build --release --verbose && \ ls /build/parity/target/release/parity && \ strip /build/parity/target/release/parity diff --git a/docker/hub/Dockerfile b/docker/hub/Dockerfile deleted file mode 100644 index 3120eeba7..000000000 --- a/docker/hub/Dockerfile +++ /dev/null @@ -1,83 +0,0 @@ -FROM ubuntu:14.04 -MAINTAINER Parity Technologies -WORKDIR /build -#ENV for build TAG -ARG BUILD_TAG -ENV BUILD_TAG ${BUILD_TAG:-master} -RUN echo $BUILD_TAG -# install tools and dependencies -RUN apt-get update && \ - apt-get install -y --force-yes --no-install-recommends \ - # make - build-essential \ - # add-apt-repository - software-properties-common \ - make \ - curl \ - wget \ - git \ - g++ \ - gcc \ - libc6 \ - libc6-dev \ - binutils \ - file \ - openssl \ - libssl-dev \ - libudev-dev \ - pkg-config \ - dpkg-dev \ - # evmjit dependencies - zlib1g-dev \ - libedit-dev \ - libudev-dev &&\ -# cmake and llvm ppa's. then update ppa's - add-apt-repository -y "ppa:george-edison55/cmake-3.x" && \ - add-apt-repository "deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.7 main" && \ - apt-get update && \ - apt-get install -y --force-yes cmake llvm-3.7-dev && \ -# install evmjit - git clone https://github.com/debris/evmjit && \ - cd evmjit && \ - mkdir build && cd build && \ - cmake .. && make && make install && cd && \ -# install rustup - curl https://sh.rustup.rs -sSf | sh -s -- -y && \ -# rustup directory - PATH=/root/.cargo/bin:$PATH && \ -# show backtraces - RUST_BACKTRACE=1 && \ -# build parity - cd /build&&git clone https://github.com/paritytech/parity && \ - cd parity && \ - git pull&& \ - git checkout $BUILD_TAG && \ - cargo build --verbose --release --features final && \ - #ls /build/parity/target/release/parity && \ - strip /build/parity/target/release/parity && \ - file /build/parity/target/release/parity&&mkdir -p /parity&& cp /build/parity/target/release/parity /parity&&\ -#cleanup Docker image - rm -rf /root/.cargo&&rm -rf /root/.multirust&&rm -rf /root/.rustup&&rm -rf /build&&\ - apt-get purge -y \ - # make - build-essential \ - # add-apt-repository - software-properties-common \ - make \ - curl \ - wget \ - git \ - g++ \ - gcc \ - binutils \ - file \ - pkg-config \ - dpkg-dev \ - # evmjit dependencies - zlib1g-dev \ - libedit-dev \ - cmake llvm-3.7-dev&&\ - rm -rf /var/lib/apt/lists/* -# setup ENTRYPOINT -EXPOSE 8080 8545 8180 -ENTRYPOINT ["/parity/parity"] diff --git a/docker/hub/README.md b/docker/hub/README.md deleted file mode 100644 index 6253f53f0..000000000 --- a/docker/hub/README.md +++ /dev/null @@ -1,3 +0,0 @@ -Usage - -```docker build --build-arg BUILD_TAG=branch_or_tag_name --no-cache=true --tag ethcore/parity:branch_or_tag_name .``` diff --git a/docker/ubuntu-aarch64/Dockerfile b/docker/ubuntu-aarch64/Dockerfile index c0af9dc0e..eee1587f4 100644 --- a/docker/ubuntu-aarch64/Dockerfile +++ b/docker/ubuntu-aarch64/Dockerfile @@ -1,5 +1,6 @@ FROM ubuntu:14.04 WORKDIR /build + # install tools and dependencies RUN apt-get -y update && \ apt-get install -y --force-yes --no-install-recommends \ @@ -24,14 +25,11 @@ RUN rustup target add aarch64-unknown-linux-gnu ENV RUST_BACKTRACE 1 # show tools - RUN rustc -vV && \ - cargo -V +RUN rustc -vV && cargo -V # build parity -RUN git clone https://github.com/paritytech/parity && \ - cd parity && \ - git checkout beta && \ - git pull && \ +ADD . /build/parity +RUN cd parity && \ mkdir -p .cargo && \ echo '[target.aarch64-unknown-linux-gnu]\n\ linker = "aarch64-linux-gnu-gcc"\n'\ diff --git a/docker/ubuntu-arm/Dockerfile b/docker/ubuntu-arm/Dockerfile index a371e190a..f971c98f1 100644 --- a/docker/ubuntu-arm/Dockerfile +++ b/docker/ubuntu-arm/Dockerfile @@ -1,5 +1,6 @@ FROM ubuntu:14.04 WORKDIR /build + # install tools and dependencies RUN apt-get -y update && \ apt-get install -y --force-yes --no-install-recommends \ @@ -23,16 +24,12 @@ RUN rustup target add armv7-unknown-linux-gnueabihf # show backtraces ENV RUST_BACKTRACE 1 - # show tools - RUN rustc -vV && \ - cargo -V +RUN rustc -vV && cargo -V # build parity -RUN git clone https://github.com/paritytech/parity && \ - cd parity && \ - git checkout beta && \ - git pull && \ +ADD . /build/parity +RUN cd parity && \ mkdir -p .cargo && \ echo '[target.armv7-unknown-linux-gnueabihf]\n\ linker = "arm-linux-gnueabihf-gcc"\n'\ diff --git a/docker/ubuntu-dev/Dockerfile b/docker/ubuntu-dev/Dockerfile deleted file mode 100644 index 72b4bb08e..000000000 --- a/docker/ubuntu-dev/Dockerfile +++ /dev/null @@ -1,37 +0,0 @@ -FROM ubuntu:14.04 - -# install tools and dependencies -RUN apt-get update && \ - apt-get install -y \ - # make - build-essential \ - # add-apt-repository - software-properties-common \ - curl \ - g++ \ - wget \ - git \ - # evmjit dependencies - zlib1g-dev \ - libedit-dev - -# cmake, llvm and rocksdb ppas. then update ppas -RUN add-apt-repository -y "ppa:george-edison55/cmake-3.x" && \ - add-apt-repository "deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.7 main" && \ - apt-get update && \ - apt-get install -y --force-yes cmake llvm-3.7-dev - -# install evmjit -RUN git clone https://github.com/debris/evmjit && \ - cd evmjit && \ - mkdir build && cd build && \ - cmake .. && make && make install && cd - -# install rustup -RUN curl https://sh.rustup.rs -sSf | sh -s -- -y - -# rustup directory -ENV PATH /root/.cargo/bin:$PATH - -# show backtraces -ENV RUST_BACKTRACE 1 diff --git a/docker/ubuntu-jit/Dockerfile b/docker/ubuntu-jit/Dockerfile index 548c87db6..610d07c7d 100644 --- a/docker/ubuntu-jit/Dockerfile +++ b/docker/ubuntu-jit/Dockerfile @@ -1,5 +1,6 @@ FROM ubuntu:14.04 WORKDIR /build + # install tools and dependencies RUN apt-get update && \ apt-get install -y \ @@ -45,10 +46,8 @@ gcc -v &&\ g++ -v # build parity -RUN git clone https://github.com/paritytech/parity && \ - cd parity && \ - git checkout beta && \ - git pull && \ +ADD . /build/parity +RUN cd parity && \ cargo build --release --features ethcore/jit --verbose && \ ls /build/parity/target/release/parity && \ strip /build/parity/target/release/parity diff --git a/docker/ubuntu-stable/Dockerfile b/docker/ubuntu-stable/Dockerfile deleted file mode 100644 index c3fdd362a..000000000 --- a/docker/ubuntu-stable/Dockerfile +++ /dev/null @@ -1,40 +0,0 @@ -FROM ubuntu:14.04 -WORKDIR /build -# install tools and dependencies -RUN apt-get update && \ - apt-get install -y \ - build-essential \ - g++ \ - curl \ - git \ - file \ - binutils - -# install rustup -RUN curl https://sh.rustup.rs -sSf | sh -s -- -y - -# rustup directory -ENV PATH /root/.cargo/bin:$PATH - -# show backtraces -ENV RUST_BACKTRACE 1 - -# show tools -RUN rustc -vV && \ -cargo -V && \ -gcc -v &&\ -g++ -v - -# build parity -RUN git clone https://github.com/paritytech/parity && \ - cd parity && \ - git checkout stable && \ - git pull && \ - cargo build --release --verbose && \ - ls /build/parity/target/release/parity && \ - strip /build/parity/target/release/parity - -RUN file /build/parity/target/release/parity - -EXPOSE 8080 8545 8180 -ENTRYPOINT ["/build/parity/target/release/parity"] diff --git a/docker/ubuntu/Dockerfile b/docker/ubuntu/Dockerfile index 0ee84e1c5..e840cdc6e 100644 --- a/docker/ubuntu/Dockerfile +++ b/docker/ubuntu/Dockerfile @@ -1,5 +1,6 @@ FROM ubuntu:14.04 WORKDIR /build + # install tools and dependencies RUN apt-get update && \ apt-get install -y \ @@ -29,10 +30,8 @@ gcc -v &&\ g++ -v # build parity -RUN git clone https://github.com/paritytech/parity && \ - cd parity && \ - git checkout beta && \ - git pull && \ +ADD . /build/parity +RUN cd parity && \ cargo build --release --verbose && \ ls /build/parity/target/release/parity && \ strip /build/parity/target/release/parity