Skip to content

Commit

Permalink
Change Dockerfile to use non-root user
Browse files Browse the repository at this point in the history
Signed-off-by: Nicko Guyer <[email protected]>
  • Loading branch information
nguyer committed Jan 10, 2024
1 parent b7f33e9 commit 0edd84b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM golang:1.19-buster AS builder
WORKDIR /ethconnect
RUN apt-get update -y \
&& apt-get install -y build-essential git \
&& curl -Lo /usr/bin/solc https://github.com/ethereum/solidity/releases/download/v0.8.15/solc-static-linux \
&& chmod 755 /usr/bin/solc
&& apt-get install -y build-essential git \
&& curl -Lo /usr/bin/solc https://github.com/ethereum/solidity/releases/download/v0.8.15/solc-static-linux \
&& chmod 755 /usr/bin/solc
ADD go.mod go.sum ./
RUN grep -v ethbinding go.mod > go.mod.new \
&& cp go.mod.new go.mod
&& cp go.mod.new go.mod
RUN go get github.com/kaleido-io/ethbinding
RUN go mod download
ADD . .
Expand All @@ -27,4 +27,6 @@ RUN apt-get update \
&& ln -s /ethconnect/ethconnect /usr/bin/ethconnect

RUN mkdir abis
USER 1001

ENTRYPOINT [ "./start.sh" ]

0 comments on commit 0edd84b

Please sign in to comment.