I'm trying to have docker compile my node project in the same folder as the source.
This is my Dockerfile
:
FROM node:16.8.0-alpine
WORKDIR /app
RUN rm -rf node_modules
RUN yarn install
RUN yarn build
And this is my docker-compose.yml
file:
version: "3"
services:
vuebuild:
build: ./frontend
volumes:
- ./frontend:/app
But I'm getting this error:
> [5/5] RUN yarn dev:
#8 0.649 yarn run v1.22.5
#8 0.673 error Couldn't find a package.json file in "/app"
#8 0.673 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
------
executor failed running [/bin/sh -c yarn dev]: exit code: 1
ERROR: Service 'vuebuild' failed to build : Build failed