ambitious-petabyte-59095
11/29/2021, 4:55 PM// services/frontend/BUILD
docker_image(name="front", dependencies=[":public", ":package", ":config"])
resources(
name="package",
sources=["services/frontend/package*.json"],
)
resource(
name="config",
source="services/frontend/vue.config.js"
)
resources(
name="public",
sources=["services/frontend/public/*"],
)
// services/frontend/Dockerfile
FROM node:17.1.0 as build-stage
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY public .
COPY package.json ./
COPY vue.config.js ./
RUN npm run build
// General Project Structure
services
- frontend /
- public/
- data/
- fonts/
- BUILD
- Dockerfile
- package.json
- vue.config.js
src
- js /
- python /
BUILD
pants.toml
requirements.txt
I keep encountering:
#12 [7/8] COPY vue.config.js ./
#12 ERROR: "/vue.config.js" not found: not found
#10 [5/8] COPY public .
#10 ERROR: "/public" not found: not found
#11 [6/8] COPY package.json ./
#11 ERROR: "/package.json" not found: not found
Thanks so muchcurved-television-6568
11/29/2021, 5:01 PMfiles
rather than resources
for your docker_image
targets.Dockerfile
you need the full path to your files, that is COPY services/frontend/β¦
ambitious-petabyte-59095
11/30/2021, 10:45 AM