2021-07-07 20:45:37 +00:00
|
|
|
FROM node:12.22.3-alpine AS builder
|
|
|
|
WORKDIR /otterscan-build
|
2021-07-08 05:14:33 +00:00
|
|
|
COPY ["package.json", "package-lock.json", "/otterscan-build"]
|
2021-07-07 20:45:37 +00:00
|
|
|
RUN npm install
|
2021-07-08 05:14:33 +00:00
|
|
|
COPY ["run-nginx.sh", "tsconfig.json", "craco.config.js", "tailwind.config.js", "/otterscan-build"]
|
|
|
|
COPY ["public", "/otterscan-build/public"]
|
|
|
|
COPY ["src", "/otterscan-build/src"]
|
2021-07-07 20:45:37 +00:00
|
|
|
RUN npm run build
|
|
|
|
|
2021-07-07 19:59:49 +00:00
|
|
|
FROM nginx:1.21.1-alpine
|
2021-07-08 00:57:03 +00:00
|
|
|
RUN apk add jq
|
2021-07-07 19:59:49 +00:00
|
|
|
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
|
2021-07-07 20:45:37 +00:00
|
|
|
COPY --from=builder /otterscan-build/build /usr/share/nginx/html/
|
2021-07-08 00:57:03 +00:00
|
|
|
COPY --from=builder /otterscan-build/run-nginx.sh /
|
|
|
|
WORKDIR /
|
|
|
|
|
|
|
|
CMD ["/run-nginx.sh"]
|