carlessanagustin
7/24/2018 - 2:54 PM

Netcat in a Docker container

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>