See complete series on Docker here:
• Playlist
EXPOSE: the EXPOSE instruction informs Docker that the container listens on the specified network ports at runtime. You can specify whether the port listens on TCP or UDP, and the default is TCP if the protocol is not specified.
-----------------------------------
FROM ubuntu:16.04
ENV NAME suraj
ENV PASS password
RUN mkdir -p /var/run/sshd
RUN apt-get update && apt-get install -y openssh-server
RUN useradd -d /home/suraj -g root -G sudo -m \
-p $(echo "$PASS" | openssl passwd -1 -stdin) $NAME
EXPOSE 22 80
CMD ["/usr/sbin/sshd", "-D"]
$docker build ...
$docker run -P -itd ...
$docker inspect containerid
$ssh [email protected]
$ifconfig
$ssh [email protected] -p 32768
cat /etc/os-re*
Watch video #23 Docker Tutorial | Dockerfile Expose online without registration, duration hours minute second in high quality. This video was added by user One Minute Notes 02 September 2020, don't forget to share it with your friends and acquaintances, it has been viewed on our site 194 once and liked it 6 people.