2019-04-13 19:05:18 -05:00
|
|
|
#! /bin/bash
|
|
|
|
|
|
|
|
echo "
|
|
|
|
FROM $1
|
|
|
|
|
|
|
|
ARG docker_container_name
|
|
|
|
|
|
|
|
## Make apt-get non-interactive
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
|
|
|
|
{% if $2 is defined %}
|
|
|
|
{% if $2|length %}
|
|
|
|
|
|
|
|
COPY \
|
|
|
|
{% for deb in $2.split(' ') -%}
|
|
|
|
debs/{{ deb }}{{' '}}
|
|
|
|
{%- endfor -%}
|
|
|
|
debs/
|
|
|
|
|
|
|
|
RUN dpkg -i \
|
|
|
|
{% for deb in $2.split(' ') -%}
|
|
|
|
debs/{{ deb }}{{' '}}
|
|
|
|
{%- endfor %}
|
|
|
|
|
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if $3 is defined %}
|
|
|
|
{% if $3|length %}
|
|
|
|
|
2020-02-10 19:16:42 -06:00
|
|
|
RUN apt-get update && apt-get install -f -y \
|
2019-04-13 19:05:18 -05:00
|
|
|
{% for dbg in $3.split(' ') -%}
|
|
|
|
{{ dbg }}{{' '}}
|
|
|
|
{%- endfor %}
|
|
|
|
|
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
|
|
## Clean up
|
|
|
|
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
|
|
|
|
RUN rm -rf /debs
|
|
|
|
|
|
|
|
"
|