While I can't say for sure what's causing your issue, it's probably because there's an error running the ENTRYPOINT
command in your container.
Is it possible you're using a docker-compose.yml
file? Your COPY
command can't have ../
or anything outside of the current directory. To do this, you'll want to change the context via either your docker build
command or the docker-compose.yml
file.
I had a similar issue where I was changing the WORKDIR
and then doing a COPY . .
instead of leaving WORKDIR
at ~/
and doing COPY ${STAGING_DIRECTORY} .
.
In Azure, go to your "Container settings". Down below, you'll see a log. You can use this log to determine the issue you're having.
It will look something like this:
2018_10_16_RD00155DFE4342_default_docker.log:
2018-10-16T16:14:33.084558195Z throw err;
2018-10-16T16:14:33.084568395Z ^
2018-10-16T16:14:33.084576596Z
2018-10-16T16:14:33.084584396Z Error: Cannot find module '/home/vsts/work/1/a/publish'
2018-10-16T16:14:33.084592096Z at Function.Module._resolveFilename (module.js:548:15)
2018-10-16T16:14:33.084599797Z at Function.Module._load (module.js:475:25)
2018-10-16T16:14:33.084607297Z at Function.Module.runMain (module.js:694:10)
2018-10-16T16:14:33.084614697Z at startup (bootstrap_node.js:204:16)
2018-10-16T16:14:33.084622297Z at bootstrap_node.js:625:3
2018_10_16_RD00155DFE4342_docker.log:
2018-10-16 16:14:01.928 ERROR - Container [CONTAINER_NAME] for site [APP_SERVICE_NAME] has exited, failing site start
2018-10-16 16:14:27.665 INFO - Starting container for site
2018-10-16 16:14:27.666 INFO - docker run -d -p 26257:80 --name [CONTAINER_NAME] -e DOCKER_CUSTOM_IMAGE_NAME=[...]
2018-10-16 16:14:29.735 ERROR - Container [CONTAINER_NAME] for site [APP_SERVICE_NAME] has exited, failing site start
2018-10-16 16:14:31.998 INFO - Starting container for site
2018-10-16 16:14:31.999 INFO - docker run -d -p 3225:80 --name [CONTAINER_NAME] -e DOCKER_CUSTOM_IMAGE_NAME=[...]
2018-10-16 16:14:34.009 ERROR - Container [CONTAINER_NAME] for site [APP_SERVICE_NAME] has exited, failing site start
The *_default_docker.log
file has the error your Docker file spouts while *_docker.log
has the generic error message from Azure.