- Newest
- Most votes
- Most comments
The "exec format error" error message usually indicates that the file you're trying to execute is not in the correct format. In this case, it could mean that the entrypoint script you're trying to run in the Docker image (/docker-entrypoint.sh) is not in the correct format for the underlying system architecture. To resolve this issue, make sure the Docker image you're using is compatible with the system architecture of the Fargate cluster. If you're using a 64-bit Ubuntu 18.04 image, for example, the architecture should be x86_64. If the image is not compatible with the architecture, you'll need to create a new image that is compatible. In your second Dockerfile, it seems that you're missing the CMD command, which is required to run the container. You'll need to add the following line to the end of the Dockerfile to run Nginx:
CMD ["nginx", "-g", "daemon off;"]
This will run Nginx in the foreground, which is necessary for Fargate to manage the lifecycle of the container.
Relevant content
- asked 3 years ago
- asked 3 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 9 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 months ago