-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
Description
On running docker build, I ran into an issue with the command:
RUN touch /data/production.db
The error:
touch: /data/production.db: No such file or directory
The command '/bin/sh -c touch /data/production.db' returned a non-zero code: 1
Expected result
The container to be built successfully
Actual result
The build process stops because of the error above. Seems like the data/ directory doesn't exist in the app/ directory in the container.
Fix (maybe)
I was able to circumvent this by copying the entire working directory into app/ and running touch ./data/production.db. Can also submit a PR if this is a good fix.
Dockerfile:
# Use Node version 10
FROM mhart/alpine-node:10
# Lock python to 2.7 somehow TODO:
RUN apk update && apk add python make g++ git
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm install
COPY . /app # updated
COPY .env.example .env
ENV PORT=8081
RUN touch ./data/production.db # updated
EXPOSE 8081
CMD [ "npm", "start" ]Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels