# Copyright 2020 Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. {% for key, value in tcib_args.items() %} ARG = {{ key }}={{ value | to_json }} {% endfor %} FROM {{ tcib_from }} {% for key, value in tcib_labels.items() %} LABEL {{ key }}={{ value | to_json }} {% endfor %} {% for key, value in tcib_envs.items() %} ENV {{ key }}={{ value | to_json }} {% endfor %} {% for item in tcib_onbuilds %} ONBUILD {{ item }} {% endfor %} {% if tcib_volumes | length > 0 %} VOLUME {{ tcib_volumes }} {% endif %} {% if tcib_workdir | length > 0 %} WORKDIR {{ tcib_workdir | to_json }} {% endif %} {% for item in tcib_adds %} ADD {{ item }} {% endfor %} {% for item in tcib_exposes %} EXPOSE {{ item }} {% endfor %} {% for item in tcib_copies %} COPY {{ item }} {% endfor %} {% if tcib_shell | length > 0 %} SHELL {{ tcib_shell.split() | to_json }} {% endif %} {% for item in tcib_runs %} {% if item is iterable and item is not string %} RUN {{ item | to_json }} {% else %} RUN {{ item }} {% endif %} {% endfor %} {% for item in tcib_actions %} {% for key, value in item.items() %} {% if value is iterable and value is not string %} {{ key.upper() }} {{ value | to_json }} {% else %} {{ key.upper() }} {{ value }} {% endif %} {% endfor %} {% endfor %} {% if tcib_healthcheck | length > 0 %} HEALTHCHECK {{ tcib_healthcheck }} {% endif %} {% if tcib_stopsignal | length > 0 %} STOPSIGNAL {{ tcib_stopsignal }} {% endif %} {% if tcib_entrypoint | length > 0 %} ENTRYPOINT {{ tcib_entrypoint.split() | to_json }} {% endif %} {% if tcib_cmd | length > 0 %} CMD {{ tcib_cmd.split() | to_json }} {% endif %} {% if tcib_user | length > 0 %} USER {{ tcib_user }} {% endif %}