openwrt-firmware-selector/Dockerfile

24 lines
639 B
Docker

FROM node:lts-alpine as build
ARG HOMEPAGE="/"
ARG ASU_URL="https://chef.libremesh.org"
WORKDIR /usr/src/app
COPY . .
RUN cat src/config.ts
RUN sed -i "s#asu_url: 'https://chef.libremesh.org'#asu_url: '$ASU_URL'#g" src/config.ts
RUN cat src/config.ts
# quick hack to get the multiarch builds running
RUN yarn add @material-ui/icons
# make the homepage config var configurable on buildtime via docker build-arg
RUN yarn add json
RUN node_modules/.bin/json -I -f package.json -e "this.homepage='$HOMEPAGE'"
RUN yarn install
RUN yarn build
FROM nginx:stable-alpine AS release
COPY --from=build /usr/src/app/build /usr/share/nginx/html