-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from metal-stack/split-images
Split into two images (vagrant), save almost 1GB for our most used image and updates
- Loading branch information
Showing
3 changed files
with
49 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,46 @@ | ||
FROM python:3.8-buster | ||
FROM debian:10 | ||
|
||
ENV VERSION_ANSIBLE=2.9.13 \ | ||
ENV VERSION_ANSIBLE=2.9.15 \ | ||
VERSION_CT=0.9.0 \ | ||
VERSION_HELM=3.4.0 \ | ||
VERSION_STERN=1.11.0 \ | ||
VERSION_VAGRANT=2.2.9 | ||
|
||
# vagrant is required for running the vagrant dynamic inventory script from within the container... | ||
ARG VAGRANT_PACKAGE_URL=https://releases.hashicorp.com/vagrant/${VERSION_VAGRANT}/vagrant_${VERSION_VAGRANT}_x86_64.deb | ||
VERSION_HELM=3.4.0 | ||
|
||
RUN set -x \ | ||
&& export CLOUD_SDK_REPO="cloud-sdk-buster" \ | ||
&& echo "deb http://packages.cloud.google.com/apt $CLOUD_SDK_REPO main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list \ | ||
&& curl -f https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - \ | ||
&& apt-get update \ | ||
&& apt-get install --yes --no-install-recommends \ | ||
apt-transport-https \ | ||
ca-certificates \ | ||
curl \ | ||
gnupg2 \ | ||
google-cloud-sdk \ | ||
software-properties-common \ | ||
connect-proxy \ | ||
libvirt-dev \ | ||
ruby-dev \ | ||
rsync \ | ||
yamllint \ | ||
&& curl -f https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - \ | ||
&& curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - \ | ||
&& add-apt-repository "deb [arch=amd64] http://packages.cloud.google.com/apt cloud-sdk-buster main" \ | ||
&& add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian buster stable" \ | ||
&& apt-get update \ | ||
&& apt-get install --yes --no-install-recommends docker-ce \ | ||
&& apt-get install --yes --no-install-recommends \ | ||
connect-proxy \ | ||
docker-ce \ | ||
git \ | ||
google-cloud-sdk \ | ||
make \ | ||
openssh-client \ | ||
python3 \ | ||
python3-pip \ | ||
python3-setuptools \ | ||
python3-wheel \ | ||
rsync \ | ||
yamllint \ | ||
&& ln -s /usr/bin/pip3 /usr/bin/pip \ | ||
&& ln -s /usr/bin/python3 /usr/bin/python \ | ||
&& ln -s /usr/bin/python3-config /usr/bin/python-config \ | ||
&& ln -s /usr/bin/python3-doc /usr/bin/python-doc \ | ||
&& curl -fsSL https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash -s -- --version "v${VERSION_HELM}" \ | ||
&& pip install --upgrade pip \ | ||
&& pip install ansible==${VERSION_ANSIBLE} Jinja2==2.11.1 netaddr==0.7.19 humanfriendly==8.1 openshift==0.11.2 paramiko==2.7.1 \ | ||
&& curl -fo vagrant.deb $VAGRANT_PACKAGE_URL \ | ||
&& dpkg -i vagrant.deb \ | ||
&& rm -f vagrant.deb \ | ||
&& vagrant plugin install vagrant-libvirt \ | ||
&& curl -Lo stern https://github.com/wercker/stern/releases/download/${VERSION_STERN}/stern_linux_amd64 \ | ||
&& chmod +x stern \ | ||
&& mv stern /usr/local/bin/ \ | ||
&& pip3 install ansible==${VERSION_ANSIBLE} Jinja2==2.11.1 netaddr==0.7.19 humanfriendly==8.1 openshift==0.11.2 paramiko==2.7.1 \ | ||
&& curl -Lo ct https://github.com/coreos/container-linux-config-transpiler/releases/download/v${VERSION_CT}/ct-v${VERSION_CT}-x86_64-unknown-linux-gnu \ | ||
&& chmod +x ct \ | ||
&& mv ct /usr/local/bin/ \ | ||
&& curl -fsSL https://dl.minio.io/client/mc/release/linux-amd64/mc -o /usr/local/bin/mc \ | ||
&& chmod +x /usr/local/bin/mc | ||
&& chmod +x /usr/local/bin/mc \ | ||
&& rm -rf /var/cache/apt/* /tmp/* | ||
|
||
ENTRYPOINT [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
ARG BASE_VERSION | ||
FROM ghcr.io/metal-stack/metal-deployment-base:${BASE_VERSION} | ||
|
||
ENV VERSION_VAGRANT=2.2.14 | ||
|
||
# vagrant is required for running the vagrant dynamic inventory script from within the container... | ||
ARG VAGRANT_PACKAGE_URL=https://releases.hashicorp.com/vagrant/${VERSION_VAGRANT}/vagrant_${VERSION_VAGRANT}_x86_64.deb | ||
|
||
RUN set -x \ | ||
&& apt update \ | ||
&& apt install --yes \ | ||
gcc \ | ||
libvirt-dev \ | ||
make \ | ||
ruby-dev \ | ||
ruby-libvirt \ | ||
&& curl -fo vagrant.deb $VAGRANT_PACKAGE_URL \ | ||
&& dpkg -i vagrant.deb \ | ||
&& rm -f vagrant.deb \ | ||
&& vagrant plugin install vagrant-libvirt | ||
|
||
ENTRYPOINT [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters