sid027 / dt1-23

1 stars 5 forks source link

Port problem with docker desktop #2

Closed antokov closed 10 months ago

antokov commented 10 months ago

Hi Sid

I have a hard struggle with docker... i've build a docker. if i run the docker file i can't reach http://127.0.0.1:5000/ping. it gives me no error back. if a want to make it work i need to bind the port --> docker run -p 5000:5000 apitest:12

so it works when i start docker from visualstudio but it won't when i want to start it with docker desktop

My docker file

FROM python:3.10-alpine

COPY main.py Pipfile Pipfile.lock ./app/

WORKDIR /app

RUN pip3 install -U pip && \
    pip3 install pipenv && \
    pip3 install pexpect && \
    pip install flask && \
    pipenv install --system --deploy

ENTRYPOINT [ "python" ]

EXPOSE 5000

CMD ["main.py" ]

busy_haslett is started from visualstudio with docker run -p 5000:5000 apitest:12 other conatiners were started manually in docker desktop

image
antokov commented 10 months ago

i found the problem...

when you want to create a image manually you can add options:

image