initial build

This commit is contained in:
Asif Bacchus 2020-02-07 06:14:56 -07:00
parent b3afdafcb0
commit 6577b0ea55
3 changed files with 53 additions and 0 deletions

3
.vscode/numbered-bookmarks.json vendored Normal file
View File

@ -0,0 +1,3 @@
{
"bookmarks": []
}

41
Dockerfile Normal file
View File

@ -0,0 +1,41 @@
# simple netcat (BSD) persistent echo server running on port 5555
# running on Alpine Linux
FROM alpine:3.11
# standardized labels
LABEL maintainer="Asif Bacchus <asif@bacchus.cloud>"
LABEL org.label-schema.cmd="docker run --rm -t -p <ipaddr>:<host port>:5555 --name ab-netcat docker.asifbacchus.app/ab-netcat"
LABEL org.label-schema.description="Persistent netcat (BSD) echo server on Alpine Linux"
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
ENTRYPOINT [ "entrypoint.sh" ]
# run nc persistent by default
CMD [ "nc", "-klv", "5555" ]
# add build date and version labels
ARG BUILD_DATE
LABEL org.label-schema.version="0.1"
LABEL org.label-schema.build-date=${BUILD_DATE}
#EOF

9
entrypoint.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/sh
#
### run supplied CMD
#
exec "$@"
#EOF