I am trying to get ember.js to run in a docker container based on the image danlynn/ember-cli image
Tried different versions of Dockerfile and docker compose.yml, but I always end up with the docker-compose up command complaining of the following :
node_modules appears empty, you may need to run
npm install
The image and container are created, but the container will not start.
I am new to the docker world, so any help would be greatly appreciated!
I am guessing I need to run npm install for the error to go away, but I added it to the Dockerfile so that It would run as the image is built, but that did not seem to help.
Here is my Dockerfile contents:
FROM danlynn/ember-cli
WORKDIR /code
COPY package.json /code
COPY bower.json /code
RUN ember init
RUN ember init --yarn
RUN bower --allow-root install
RUN npm install
COPY . /code
CMD ["ember", "serve"]
and the docker-compose.yml file:
version: "3"
services:
ember_gui:
build: .
container_name: ember_dev
volumes:
- .:/code
ports:
- "4200:4200"
- "7020:7020"
- "5779:5779"
Finally, here is the package.json just in case
{
"name": "EmberUI",
"version": "0.0.1",
"description": "Test app GUI",
"main": "index.js",
"author": "Testing",
"license": "MIT",
"dependencies": {
"chai": "^4.1.2",
"mocha": "^5.2.0"
}
}
Aucun commentaire:
Enregistrer un commentaire