Hi,
I’ve created very basic server app that listens for incoming connections on a port 8080.
If I send a request to that server the server correctly reacts to it by reading the sent message and replying to it.
Unfortunately when I put that application in the container I cannot communicate with it anymore. The application is running, I can see logs from it. I’ve tried to expose port in docker file, as well as publish port during docker run command. Nothing works.
Could anyone please help me with that issue?
Thank you
This is my Dockerfile:
FROM ubuntu
# Update default packages
RUN apt-get -qq update
# Get Ubuntu packages
RUN apt-get install -y -q \
build-essential \
curl
EXPOSE 8080
# NOTE: no need to run update again at this point
# RUN apt-get update
# Get Rust; NOTE: using sh for better compatibility with other base images
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
# Add .cargo/bin to PATH
ENV PATH="/root/.cargo/bin:${PATH}"
ADD src/ rust_app
ADD . rust_app
RUN cargo install --path rust_app
CMD [ "docker_custom_app" ]