1 2 3 4 5 6 7 8 9 10 11 12 13 |
FROM node:17.9.1-alpine3.15 AS build RUN npm install -g npm @vue/cli COPY ./ / RUN yarn install ENV NODE_OPTIONS=--openssl-legacy-provider RUN yarn build FROM node:17.9.1-alpine3.15 RUN npm install -g http-server COPY --from=build /dist /dist CMD ["http-server", "dist"] |
ENV NODE_OPTIONS=–openssl-legacy-providerはこのようなエラーが出たので入れている
1 2 3 4 |
opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ], library: 'digital envelope routines', reason: 'unsupported', code: 'ERR_OSSL_EVP_UNSUPPORTED' |
参考
https://jp.vuejs.org/v2/cookbook/dockerize-vuejs-app.html