Closed MikeTheCanuck closed 6 years ago
We specify the entrypoint in the docker-compose files under the command: https://github.com/hackoregon/backend-examplar-2018/blob/staging/production-docker-compose.yml#L8
this is going to override anything in the Dockerfile, but I maybe missing something in how ECS starts tasks, if they don't read the docker-compose, then this could be an issue? don't think it would harm anything to add it in.
Scarring memories are coming back to me - all startup using docker-compose
in the Travis environment will work fine, but when the container image is published, then deployed to ECS and finally launched by ECS, there is no docker-compose
in use - only bare docker
commands such as docker run
(AFAIK). Without the ENTRYPOINT script in DOCKERFILE, the container is dead in the water, and will never successfully deploy (since ALB will consider it "dead").
We got bit by this last year for a while. I felt like a right moron once Dan explained it to me.
I believe ENTRYPOINT values were added to the DOCKERFILE.* in another commit.
Looks like an ENTRYPOINT value was added to DOCKERFILE.api.production (see referenced issue) https://github.com/hackoregon/backend-examplar-2018/blob/f14dc25f5e4745bde570f280d57f6d987ac2bfa7/DOCKERFILE.api.production#L26 which solved the issue that Mike mentioned above, but not for DOCKERFILE.api.development or DOCKERFILE.db.development.
Do we need ENTRYPOINT values in the DOCKERFILE.*.development dockerfiles, or is this issue now resolved?
@nam20485: PR made at #87 to add ENTRYPOINT
for DOCKERFILE.api.development
file since I need it. Just did on my local machine and my CloudFormation stack is not stuck anymore. Confirm that if this ENTRYPOINT
is missing, container cannot start and ECS::Service will hang.
Closing. This change was merged in with PR #87
Last year's DOCKERFILEs all specified an ENTRYPOINT script, and if I remember correctly they're there because otherwise, once the container image gets pulled into ECS and is run on its own, there's nothing there to start the actual API runner and the container just hangs/goes zombie.