Skip to content

Commit

Permalink
Merge pull request #240 from kaleido-io/non-root-user
Browse files Browse the repository at this point in the history
Change Dockerfile to use non-root user
  • Loading branch information
peterbroadhurst authored Jan 19, 2024
2 parents dacaa74 + 0edd84b commit b966990
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 b966990

Please sign in to comment.