Merge the entire distribution into one unique docker image

This commit is contained in:
Willian Mitsuda 2021-07-07 17:45:37 -03:00
parent cf581e1ab5
commit 73779426c5
2 changed files with 10 additions and 0 deletions

1
.dockerignore Normal file
View File

@ -0,0 +1 @@
node_modules

View File

@ -1,4 +1,13 @@
FROM node:12.22.3-alpine AS builder
WORKDIR /otterscan-build
COPY ["package*.json", "tsconfig.json", "craco.config.js", "tailwind.config.js", "/otterscan-build"]
COPY ["src", "/otterscan-build/src"]
COPY ["public", "/otterscan-build/public"]
RUN npm install
RUN npm run build
FROM nginx:1.21.1-alpine
COPY 4bytes/signatures /usr/share/nginx/html/signatures/
COPY trustwallet/blockchains/ethereum/assets /usr/share/nginx/html/assets/
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=builder /otterscan-build/build /usr/share/nginx/html/