2021-07-16 21:31:34 +00:00
|
|
|
FROM node:14.17.3-alpine3.14 AS builder
|
2021-07-14 21:09:51 +00:00
|
|
|
RUN npm i -g npm@7.19.1
|
2021-07-07 20:45:37 +00:00
|
|
|
WORKDIR /otterscan-build
|
2021-07-11 02:22:17 +00:00
|
|
|
COPY ["package.json", "package-lock.json", "/otterscan-build/"]
|
2021-07-07 20:45:37 +00:00
|
|
|
RUN npm install
|
2021-07-11 02:22:17 +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-10 00:11:52 +00:00
|
|
|
FROM alpine:3.14.0 AS logobuilder
|
|
|
|
RUN apk add imagemagick parallel
|
|
|
|
WORKDIR /assets
|
|
|
|
COPY trustwallet/blockchains/ethereum/assets /assets/
|
|
|
|
RUN find . -name logo.png | parallel magick convert {} -filter Lanczos -resize 32x32 {}
|
|
|
|
|
2021-09-27 18:40:01 +00:00
|
|
|
FROM alpine:3.14.0 AS fourbytesbuilder
|
|
|
|
WORKDIR /signatures
|
|
|
|
COPY 4bytes/signatures /signatures/
|
|
|
|
COPY 4bytes/with_parameter_names /signatures/
|
|
|
|
|
2021-10-07 23:31:36 +00:00
|
|
|
FROM alpine:3.14.0 AS topic0builder
|
|
|
|
WORKDIR /topic0
|
|
|
|
COPY topic0/with_parameter_names /topic0/
|
|
|
|
|
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-10-07 23:31:36 +00:00
|
|
|
COPY --from=topic0builder /topic0 /usr/share/nginx/html/topic0/
|
2021-09-27 18:40:01 +00:00
|
|
|
COPY --from=fourbytesbuilder /signatures /usr/share/nginx/html/signatures/
|
2021-07-10 00:11:52 +00:00
|
|
|
COPY --from=logobuilder /assets /usr/share/nginx/html/assets/
|
2021-10-20 14:34:35 +00:00
|
|
|
COPY nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf
|
2021-10-20 14:45:58 +00:00
|
|
|
COPY nginx/nginx.conf /etc/nginx/nginx.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"]
|