prakhar1989/docker-curriculum

[BUG] Docker image doesn't work in AWS EB environment

nabongbong opened this issue · 1 comments

I got error when i deploy docker with AWS.

"Instance deployment: The Docker container unexpectedly ended after it was started."

This is my error message.

i checked my docker image run well in my local.
But in AWS, it doesn't work.

https://hub.docker.com/layers/bong69/catnip3/latest/images/sha256:06d39482c21038315bdc3234acea1b9686cee696831ffed471e294c92b61fc3d

This is my docker hub.

Help me plz.
I'm spending 2 days for problem solving for AWS setting and this error

FROM <base_image>

Add files to the root directory

ADD file ... /

Update and install dependencies

RUN set -eux;
apt-get update &&
apt-get install -y

Set environment variables

ENV PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
LANG=C.UTF-8
GPG_KEY=E3FF2839C048B25C084DEBE9B26995E310250568
PYTHON_VERSION=3.8.17
PYTHON_PIP_VERSION=23.0.1
PYTHON_SETUPTOOLS_VERSION=57.5.0
PYTHON_GET_PIP_URL=https://github.com/pypa/get-pip/raw/0d8570dc44796f4369b652222cf176b3db6ac70e/public/get-pip.py
PYTHON_GET_PIP_SHA256=96461deced5c2a487ddc65207ec5a9cffeca0d34e7af7ea1afc470ff0d746207

Set working directory

WORKDIR /usr/src/app

Copy application code to the container

COPY . .

Install dependencies

RUN set -eux;
pip install -r requirements.txt

Expose the necessary port

EXPOSE 5000

Start the application

CMD ["python", "./app.py"]

I got error when i deploy docker with AWS.

"Instance deployment: The Docker container unexpectedly ended after it was started."

This is my error message.

i checked my docker image run well in my local. But in AWS, it doesn't work.

https://hub.docker.com/layers/bong69/catnip3/latest/images/sha256:06d39482c21038315bdc3234acea1b9686cee696831ffed471e294c92b61fc3d

This is my docker hub.

Help me plz. I'm spending 2 days for problem solving for AWS setting and this error