diff --git a/iris-client-fe/Dockerfile b/iris-client-fe/Dockerfile index 911e1e11b..74c9e22ed 100644 --- a/iris-client-fe/Dockerfile +++ b/iris-client-fe/Dockerfile @@ -1,4 +1,4 @@ -FROM caddy:2.5.1-builder-alpine as builder +FROM node:17-alpine as builder # make the 'app' folder the current working directory WORKDIR /app @@ -6,6 +6,9 @@ WORKDIR /app # copy both 'package.json' and 'package-lock.json' (if available) COPY package*.json ./ +# install project dependencies +RUN npm ci --legacy-peer-deps + # copy project files and folders to the current working directory (i.e. 'app' folder) COPY . . @@ -13,13 +16,13 @@ ARG VUE_APP_VERSION_ID=production ARG VUE_APP_BUILD_ID=local # build app for production with minification -RUN xcaddy build +RUN npm run build --legacy-peer-deps FROM caddy:2.5.1-alpine # copy build artifacts to webserver root RUN rm -rf /usr/share/caddy -COPY --from=builder /app/caddy /usr/share/caddy +COPY --from=builder /app/dist /usr/share/caddy # copy webserver configuration COPY ./Caddyfile /etc/caddy/Caddyfile