Skip to content

Instantly share code, notes, and snippets.

@jordimassaguerpla
Last active December 1, 2015 14:22
Show Gist options
  • Save jordimassaguerpla/172521403d14cc70cb73 to your computer and use it in GitHub Desktop.
Save jordimassaguerpla/172521403d14cc70cb73 to your computer and use it in GitHub Desktop.
netcat docker example
FROM opensuse:latest
MAINTAINER Jordi Massaguer "[email protected]"
RUN echo -e "#!/bin/sh\n \nnc -l 80" > /bin/hello-world-server
RUN chmod +x /bin/hello-world-server
RUN zypper -n install "netcat-openbsd"
EXPOSE 80
CMD /bin/hello-world-server
# test me with "telnet IP 80"
# get the ip with docker inspect CONTAINER
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment