Skip to content

Instantly share code, notes, and snippets.

@carlessanagustin
Last active August 8, 2018 07:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carlessanagustin/1e58fb09f2314c1a7daeba277f15832b to your computer and use it in GitHub Desktop.
Save carlessanagustin/1e58fb09f2314c1a7daeba277f15832b to your computer and use it in GitHub Desktop.
Netcat in a Docker container
FROM alpine:latest
RUN apk add --no-cache netcat-openbsd
ENTRYPOINT [ "nc" ]
# usage...
# build: docker build -t netcat:latest .
# server: docker run --rm -p <hostPort>:<containerPort> netcat:latest -l <port>
# client: docker run --rm netcat:latest <hostname> <remotePort>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment