-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Will be rebased/squashed
- Loading branch information
Showing
2 changed files
with
38 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
**/target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |