Dockerfile 746 B

123456789101112131415161718
  1. FROM node:14-alpine AS build
  2. LABEL maintainer="Stille <[email protected]>"
  3. ENV SUBCONVERTER_VERSION=v0.9.0
  4. WORKDIR /
  5. RUN apk add --no-cache bash git curl zip
  6. RUN if [ "$(uname -m)" = "x86_64" ]; then export PLATFORM=linux64 ; else if [ "$(uname -m)" = "aarch64" ]; then export PLATFORM=aarch64 ; fi fi \
  7. && wget https://github.com/tindy2013/subconverter/releases/download/${SUBCONVERTER_VERSION}/subconverter_${PLATFORM}.tar.gz \
  8. && tar xzf subconverter_${PLATFORM}.tar.gz
  9. RUN git clone https://github.com/stilleshan/subweb app
  10. RUN cd /app && npm install && npm run build
  11. FROM nginx:1.16-alpine
  12. COPY --from=build /app/dist /usr/share/nginx/html
  13. COPY --from=build /subconverter /base
  14. COPY . /app
  15. EXPOSE 80
  16. CMD [ "sh", "-c", "/app/start.sh" ]