mirror of
https://github.com/lens-protocol/core.git
synced 2026-04-22 03:02:03 -04:00
reset dockerfile
This commit is contained in:
15
Dockerfile
15
Dockerfile
@@ -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"]
|
||||
Reference in New Issue
Block a user