I'm using the following Dockerfile inside of a nodejs repository.
# Pull base image
FROM node:latest
# Set working directory
WORKDIR /usr/src/app
# Install app dependencies
COPY package*.json ./
RUN npm install
# Copy app files
COPY . .
# Start the app
EXPOSE 3000
# Run the app
CMD [ "npm", "start" ]
The COPY package*.json ./ command causes the compose.up() function to fail due to the way source files are configured in serviceTools.js
|
if (dockerfile !== null) { |
|
obj['dockerfile'] = path.basename(dockerfile); |
|
let streami = await docker.buildImage( |
|
{ |
|
context: buildPath, |
|
src: [dockerfile], |
|
}, |
|
obj |
|
); |
According to the dockerode docs https://github.com/apocas/dockerode#building-an-image, the value of src must include ALL files that will be referenced in a command such as COPY. Is there a workaround or plan to include files other than Dockerfile in the source files array?
I'm using the following Dockerfile inside of a nodejs repository.
The
COPY package*.json ./command causes the compose.up() function to fail due to the way source files are configured in serviceTools.jsdockerode-compose/lib/servicesTools.js
Lines 650 to 658 in 7875946
According to the dockerode docs https://github.com/apocas/dockerode#building-an-image, the value of src must include ALL files that will be referenced in a command such as COPY. Is there a workaround or plan to include files other than Dockerfile in the source files array?