reset dockerfile

This commit is contained in:
damarnez
2022-03-05 16:48:58 +01:00
parent 68bac25c76
commit 8e9f97ebec

View File

@@ -3,9 +3,6 @@ FROM ethereum/solc:0.8.7 as build-deps
FROM node:16 as build-packages
# Need to be root becuse some issues with hardhat
USER root
COPY package*.json ./
COPY tsconfig*.json ./
@@ -13,16 +10,12 @@ RUN npm ci --quiet
FROM node:16
WORKDIR /usr/src/app
WORKDIR /src
COPY --from=build-deps /usr/bin/solc /usr/bin/solc
COPY --from=build-packages /node_modules /node_modules
COPY docker-entrypoint.sh /docker-entrypoint.sh
# Hardhat need permisions to create and remove folders
# We create a new root user because the default generate some issues with the package.
RUN useradd admin && echo "admin:admin" | chpasswd && adduser admin sudo
RUN mkdir /home/admin
RUN chown admin:admin /home/admin
USER admin
USER node
ENTRYPOINT ["sh", "/docker-entrypoint.sh"]