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 8
/
Copy pathDockerfile.template
62 lines (49 loc) · 2.01 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# This is a template for container-images
# Please, replace or remove all strings with %% prefix
FROM registry.fedoraproject.org/f26-modular/boltron
# Provide some Dockerfile description
# %%{DOCKERFILE_DESCRIPTION}
#
# Volumes:
# * %%{VOLUME_PATH} - %%{VOLUME_DESCRIPTION}
# Environment:
# * %%{ENV_VARIABLE} - %%{ENV_VARIABLE_DESCRIPTION}
# Exposed ports:
# * %%{PORT} - %%{PORT_DESCRIPTION}
# Additional packages
# * %%{ADDITIONAL_PACKAGE_NAME} - %%{ADDITIONAL_PACKAGE_USAGE}
LABEL MAINTAINER "%%{REAL_NAME}" <%%{EMAIL_ADDRESS}>
# Enviroment variables
ENV NAME=%%{NAME} RELEASE=%%{RELEASE} ARCH=%%{ARCH}
# All following labels are mandatory
LABEL summary="%%{SUMMARY}" \
name="$FGC/$NAME" \
version="%%{VERSION}" \
release="$RELEASE.$DISTTAG" \
architecture="$ARCH" \
com.redhat.component="$NAME" \
usage="%%{USAGE}" \
help="%%{HELP}" \
description="%%{DESCRIPTION}" \
io.k8s.description="%%{DESCRIPTION}" \
io.k8s.display-name="%%{K8S_DISPLAY_NAME}" \
io.openshift.expose-services="%%{EXPOSE_SERVICES}" \
io.openshift.tags="%%{TAGS}"
# Instalation of module packages - this solution is temporary
RUN dnf install -y --nodocs %%{API_PACKAGES} && \
dnf -y clean all
# Directive adds files from a directory (e.g. scripts) in current directory to a container directory like /files
ADD %%{scripts} %%{/files}
# Command which runs during `docker build`
RUN %%{/files/<some_bash_script>.sh}
# EXPOSE instruction exposes port from container to host.
# Specify it during `docker run` as parameter: "-p <host_port>:<container_port>"
EXPOSE %%{PORT}
# Specify username which will be used during running container
USER %%{PROCESS_UID}
# VOLUME instruction creates unnamed volume and mounts it to the provided path,
# you can override this behavior by mounting
# a selected host directory into container: "-v <host_directory>:<container_directory>"
VOLUME [%%{VOLUME_PATH}]
# Command which will start service during command `docker run`
CMD ["%%{/files/<your_script>.sh}"]