Skip to content

Commit

Permalink
improved dockerfile builds (openethereum#5659)
Browse files Browse the repository at this point in the history
* docker builds current branch instead of cloning the repo

* moved ADD command right before RUN cd parity in Dockerfiles

* update docker/README.md

* removed --no-cache from docker/README.md
  • Loading branch information
debris authored and arkpar committed May 23, 2017
1 parent f47cbe0 commit 92f5aa7
Show file tree
Hide file tree
Showing 11 changed files with 48 additions and 190 deletions.
22 changes: 22 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Usage

```docker build -f docker/ubuntu/Dockerfile --tag ethcore/parity:branch_or_tag_name .```
15 changes: 9 additions & 6 deletions docker/centos/Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand Down
83 changes: 0 additions & 83 deletions docker/hub/Dockerfile

This file was deleted.

3 changes: 0 additions & 3 deletions docker/hub/README.md

This file was deleted.

10 changes: 4 additions & 6 deletions docker/ubuntu-aarch64/Dockerfile
Original file line number Diff line number Diff line change
@@ -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 \
Expand All @@ -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'\
Expand Down
11 changes: 4 additions & 7 deletions docker/ubuntu-arm/Dockerfile
Original file line number Diff line number Diff line change
@@ -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 \
Expand All @@ -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'\
Expand Down
37 changes: 0 additions & 37 deletions docker/ubuntu-dev/Dockerfile

This file was deleted.

7 changes: 3 additions & 4 deletions docker/ubuntu-jit/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
FROM ubuntu:14.04
WORKDIR /build

# install tools and dependencies
RUN apt-get update && \
apt-get install -y \
Expand Down Expand Up @@ -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
Expand Down
40 changes: 0 additions & 40 deletions docker/ubuntu-stable/Dockerfile

This file was deleted.

7 changes: 3 additions & 4 deletions docker/ubuntu/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
FROM ubuntu:14.04
WORKDIR /build

# install tools and dependencies
RUN apt-get update && \
apt-get install -y \
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 92f5aa7

Please sign in to comment.