This repository has been archived by the owner on Mar 7, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Dockerfile.template
36 lines (29 loc) · 1.33 KB
/
Dockerfile.template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM {{ config.docker.registry }}/{{ config.docker.from }}
LABEL maintainer [email protected]
ENV NAME=mycontainer VERSION=0 RELEASE=1 ARCH=x86_64
LABEL summary="A container that tells you how awesome it is." \
com.redhat.component="$NAME" \
name="$NAME" \
version="$VERSION" \
release="$RELEASE.$DISTTAG" \
architecture="$ARCH" \
usage="docker run -p 9000:9000 mycontainer" \
help="Runs mycontainer, which listens on port 9000 and tells you how awesome it is. No dependencies." \
description="{{ spec.description }}" \
vendor="{{ spec.vendor }}" \
org.fedoraproject.component="postfix" \
authoritative-source-url="{{ spec.authoritative_source_url }}" \
io.k8s.description="{{ spec.description }}" \
io.k8s.display-name="Awesome container with SW version {{ spec.version }}" \
io.openshift.expose-services="9000:http" \
io.openshift.tags="some,tags"
EXPOSE 9000
# We don't actually use the "software_version" here, but we could,
# e.g. to install a module with that ncat version
RUN {{ commands.pkginstaller.install(['nmap-ncat']) }} && \
{{ commands.pkginstaller.cleancache() }}
# add help file
# NOTE: this file is rendered from help.md, it's not actually templated (help.md is)
COPY root/help.1 /
COPY script.sh /usr/bin/
CMD ["/usr/bin/script.sh"]