ab-netcat/Dockerfile

41 lines
1.1 KiB
Docker
Raw Normal View History

2020-02-07 07:52:22 -07:00
# simple netcat (BSD) persistent "listen" server running on port 5555
2020-02-07 06:14:56 -07:00
# running on Alpine Linux
2020-12-31 01:49:58 -07:00
FROM alpine:3.12
2020-02-07 06:14:56 -07:00
# standardized labels
LABEL maintainer="Asif Bacchus <asif@bacchus.cloud>"
2020-02-07 07:23:31 -07:00
LABEL org.label-schema.cmd="docker run --rm docker.asifbacchus.app/ab-netcat help"
2020-02-07 07:52:22 -07:00
LABEL org.label-schema.description="Persistent netcat (BSD) listen server on Alpine Linux"
2020-02-07 06:14:56 -07:00
LABEL org.label-schema.name="ab-netcat"
LABEL org.label-schema.schema-version="1.0"
LABEL org.label-schema.url="https://git.asifbacchus.app/ab-docker/ab-netcat"
LABEL org.label-schema.usage="https://git.asifbacchus.app/ab-docker/ab-netcat/wiki"
LABEL org.label-schema.vcs-url="https://git.asifbacchus.app/ab-docker/ab-netcat.git"
# install tzdata so timezone can be set
RUN apk --update --no-cache add \
tzdata \
netcat-openbsd
# expose port
EXPOSE 5555
# environment variables
ENV TZ=Etc/UTC
# copy files
COPY entrypoint.sh /
# entrypoint script
2020-02-07 06:15:25 -07:00
ENTRYPOINT [ "/entrypoint.sh" ]
2020-02-07 06:14:56 -07:00
# run nc persistent by default
CMD [ "nc", "-klv", "5555" ]
# add build date and version labels
ARG BUILD_DATE
2020-02-07 06:48:01 -07:00
LABEL org.label-schema.version="1.0"
2020-02-07 06:14:56 -07:00
LABEL org.label-schema.build-date=${BUILD_DATE}
#EOF