How to add the possibility to use the "git clone" command in a container

Hello,

I need to use the command “git clone” in a container but I can’t do it because the container says:

bash: git: command not found

I need to use the command for add a module in the icinga container…

I looked in the Dockerfile and I saw this:

#First apt-get batch
RUN export DEBIAN_FRONTEND=noninteractive \
     && apt-get update \
     && apt-get upgrade -y \
     && apt-get install -y --no-install-recommends \
          ca-certificates \
          curl \
          gcc  \
          gnupg2 \
          graphviz \
          logrotate \
          mysql-client \
          net-tools \
          ntp       \
          php5-cli \
          php5-gd \
          php5-intl \
          php5-imagick \
          php5-curl \
          php5-ldap \
          php5-mysql \
          php5-sqlite \
          procps \
          python \
          python-dev \
          pwgen \
          rsync \
          snmp \
          libsnmp-base \
          tcpdump \
          sudo \
          supervisor \
          unzip \
          wget \
     && apt-get clean \
     && rm -rf /var/lib/apt/lists/*

So I think that these are the only command available…how can I enable the “git” command? is enough to add “git” to the list I have reposted above?

Thank You

Giulia

Hi,

You can add it to the list above though you will need to rebuild the container.
But as far as I know, you can install modules without git, just by downloading tar.gz files.

What module are you trying to install by the way?

Cheers,
George

2 Likes

Director and the modules required for it…
If I rebuild the container it will integrate good with the other icinga container and the mariadb container?

How can I make a backup?

Giulia

All the modules support git and tarballs. In fact cloning the repo is not recommended since there probably are commits after the release which could introduce bugs or instabilities.

As for the containers, no one can guarantee you compatibility. Probably yes, but shit happens.

/George

1 Like