ENV PORT=3000
ENV NODE_ENV=production
EXPOSE $PORT
WORKDIR $APP_DIR
COPY yarn.lock package.json $APP_DIR/
RUN ["/usr/local/bin/yarn"]
COPY . $APP_DIR
ENTRYPOINT ["/usr/local/bin/yarn", "run"]
CMD ['dev']
Was running this using this command
docker run --rm -p 3000:3000 my-app:latest
And the console outputs
yarn run v0.17.9
error Command "/bin/sh" not found.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
I expect /usr/local/bin/yarn run dev to be executed inside docker, am I missing something?
Try switching to double quotes, single quotes aren't valid for a json string:
CMD ["dev"]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With