Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
FROM golang:latest

ARG BOR_DIR=/bor
ARG BOR_DIR=/var/lib/bor
ENV BOR_DIR=$BOR_DIR

RUN apt-get update -y && apt-get upgrade -y \
&& apt install build-essential git -y \
&& mkdir -p /bor
&& mkdir -p ${BOR_DIR}

WORKDIR ${BOR_DIR}
COPY . .
RUN make bor

RUN cp build/bin/bor /usr/local/bin/
RUN cp build/bin/bor /usr/bin/
RUN groupadd -g 10137 bor \
&& useradd -u 10137 --no-log-init --create-home -r -g bor bor \
&& chown -R bor:bor ${BOR_DIR}

ENV SHELL /bin/bash
EXPOSE 8545 8546 8547 30303 30303/udp
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.alltools
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ RUN set -x \
&& apk add --update --no-cache \
ca-certificates \
&& rm -rf /var/cache/apk/*
COPY --from=builder /bor/build/bin/* /usr/local/bin/
COPY --from=builder /bor/build/bin/* /usr/bin/

EXPOSE 8545 8546 30303 30303/udp
18 changes: 14 additions & 4 deletions Dockerfile.release
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
FROM alpine:3.14

ARG BOR_DIR=/var/lib/bor
ENV BOR_DIR=$BOR_DIR

RUN apk add --no-cache ca-certificates && \
mkdir -p /etc/bor
COPY bor /usr/local/bin/
COPY builder/files/genesis-mainnet-v1.json /etc/bor/
COPY builder/files/genesis-testnet-v4.json /etc/bor/
mkdir -p ${BOR_DIR}

WORKDIR ${BOR_DIR}
COPY bor /usr/bin/
COPY builder/files/genesis-mainnet-v1.json ${BOR_DIR}
COPY builder/files/genesis-testnet-v4.json ${BOR_DIR}
RUN groupadd -g 10137 bor \
&& useradd -u 10137 --no-log-init --create-home -r -g bor bor \
&& chown -R bor:bor ${BOR_DIR}

USER bor

EXPOSE 8545 8546 8547 30303 30303/udp
ENTRYPOINT ["bor"]