initial build
This commit is contained in:
parent
b3afdafcb0
commit
6577b0ea55
3
.vscode/numbered-bookmarks.json
vendored
Normal file
3
.vscode/numbered-bookmarks.json
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"bookmarks": []
|
||||
}
|
41
Dockerfile
Normal file
41
Dockerfile
Normal 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
9
entrypoint.sh
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
### run supplied CMD
|
||||
#
|
||||
|
||||
exec "$@"
|
||||
|
||||
#EOF
|
Loading…
Reference in New Issue
Block a user