0bca6b8468
2) Install debug tools in every debug docker image 3) Install available debug symbols in debug docker image 4) Provide additional host/docker mapping for host dirs /src & /debug 4.1) The one-image will have source code under /src 4.2) /debug is mapped as rw. User can put his core file there and use this dir to collect debug session logs too. 5) Build debug image using debug dockers 6) Source code is archived into /src of debug image 7) The welcome banner is extended to display these additional facilities in debug image.
45 lines
618 B
Bash
Executable File
45 lines
618 B
Bash
Executable File
#! /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 %}
|
|
|
|
RUN apt-get install -f -y \
|
|
{% 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
|
|
|
|
"
|