Skip to content

Commit

Permalink
Merge pull request #592 from maticnetwork/wbutton/v0.3.0-docker-qa
Browse files Browse the repository at this point in the history
Docker v0.3.0 release for QA
  • Loading branch information
rekibnikufesin authored Nov 23, 2022
2 parents b1f4196 + 08ec50a commit e468e96
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 8 deletions.
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"]

0 comments on commit e468e96

Please sign in to comment.