Skip to content

Commit

Permalink
Temporary commit
Browse files Browse the repository at this point in the history
Will be rebased/squashed
  • Loading branch information
Ujang360 committed Mar 20, 2020
1 parent 44ed7e6 commit c2aff51
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 34 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**/target
71 changes: 37 additions & 34 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,42 +1,45 @@
# Stage 1 - Build

FROM golang:1.14-buster as builder
FROM bitwyre/native-builder:latest as builder

COPY go-ethereum /app/src/go-ethereum
WORKDIR /app/src/go-ethereum
WORKDIR /app/parity

RUN apt-get update && apt-get install -y build-essential
RUN echo "\nSubmodule files:"&& \
ls -Falg --group-directories-first && \
echo && \
gcc --version && \
make -j$(nproc) geth
RUN cd /app/src/go-ethereum/build && \
ls -Falg --group-directories-first && \
strip bin/geth
# YASM
COPY yasm yasm
RUN cd yasm && \
./autogen.sh && \
./configure && \
make -j4 install

# Open-Ethereum
COPY openethereum openethereum
WORKDIR /app/parity/openethereum
ENV PATH /root/.cargo/bin:/usr/lib/llvm-10/bin:$PATH
RUN RUSTFLAGS="-C link-args=-s -C codegen-units=1" cargo build --release --features final
RUN ls -Falg target/release

# Stage 2 - Production Image

FROM ubuntu:18.04

LABEL maintainer "Yefta Sutanto <[email protected]>"

RUN apt-get update && \
apt-get install -y --no-install-recommends gosu && \
rm -rf /var/lib/apt/lists/* && \
groupadd -r ethereum && useradd -r -m -g ethereum ethereum
RUN mkdir -p /home/ethereum/.ethereum && \
chown -R ethereum:ethereum /home/ethereum

COPY --from=builder /app/src/go-ethereum/build/bin /usr/local/bin
COPY docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x /docker-entrypoint.sh

VOLUME ["/home/ethereum/.ethereum"]
EXPOSE 8545 8546 8547 30303 30303/udp

ENV ETHEREUM_DATA "/home/ethereum/.ethereum"
# Stage 2 - Production Image

ENTRYPOINT ["/./docker-entrypoint.sh"]
CMD ["geth"]
#FROM ubuntu:18.04
#
#LABEL maintainer "Yefta Sutanto <[email protected]>"
#
#RUN apt-get update && \
# apt-get install -y --no-install-recommends gosu && \
# rm -rf /var/lib/apt/lists/* && \
# groupadd -r ethereum && useradd -r -m -g ethereum ethereum
#RUN mkdir -p /home/ethereum/.ethereum && \
# chown -R ethereum:ethereum /home/ethereum
#
#COPY --from=builder /app/src/go-ethereum/build/bin /usr/local/bin
#COPY docker-entrypoint.sh /docker-entrypoint.sh
#RUN chmod +x /docker-entrypoint.sh
#
#VOLUME ["/home/ethereum/.ethereum"]
#EXPOSE 8545 8546 8547 30303 30303/udp
#
#ENV ETHEREUM_DATA "/home/ethereum/.ethereum"
#
#ENTRYPOINT ["/./docker-entrypoint.sh"]
#CMD ["geth"]

0 comments on commit c2aff51

Please sign in to comment.