Commit 6da13326 authored by Ondřej Surý's avatar Ondřej Surý

Use templates for Debian/Ubuntu images

parent 89145c83
...@@ -2,12 +2,12 @@ variables: ...@@ -2,12 +2,12 @@ variables:
DEBIAN_FRONTEND: noninteractive DEBIAN_FRONTEND: noninteractive
LC_ALL: C LC_ALL: C
DOCKER_DRIVER: overlay2 DOCKER_DRIVER: overlay2
CI_REGISTRY_IMAGE: oerdnj # CI_REGISTRY_IMAGE: oerdnj
stages: stages:
- image - image
.image: &image debian_ubuntu_images:
image: docker:latest image: docker:latest
stage: image stage: image
services: services:
...@@ -17,17 +17,6 @@ stages: ...@@ -17,17 +17,6 @@ stages:
before_script: before_script:
- echo -n "$DOCKER_IO_PASSWORD" | docker login --username oerdnj --password-stdin - echo -n "$DOCKER_IO_PASSWORD" | docker login --username oerdnj --password-stdin
- docker info - docker info
- docker login -u "$CI_REGISTRY_USER" -p "$CI_JOB_TOKEN" "$CI_REGISTRY"
script: script:
- docker pull "$CI_REGISTRY_IMAGE/$CI_JOB_NAME" || true - make -j $(grep 'core id' /proc/cpuinfo | wc -l)
- docker build --no-cache -t "$CI_REGISTRY_IMAGE/$CI_JOB_NAME" "docker/$(echo $CI_JOB_NAME | sed -e 's,:,/,')"
- docker push "$CI_REGISTRY_IMAGE/$CI_JOB_NAME"
# - docker login -u "$CI_REGISTRY_USER" -p "$CI_JOB_TOKEN" "$CI_REGISTRY"
# - docker pull "$CI_REGISTRY_IMAGE/$CI_JOB_NAME" || true
# - docker build --cache-from "$CI_REGISTRY_IMAGE/$CI_JOB_NAME" -t "$CI_REGISTRY_IMAGE/$CI_JOB_NAME" "docker/$CI_JOB_NAME"
# - docker push "$CI_REGISTRY_IMAGE/$CI_JOB_NAME"
bind9:debian-sid-amd64:
<<: *image
bind9:debian-sid-i386:
<<: *image
DISTROS := debian ubuntu
ARCHS := amd64 i386
debian_VERSIONS := jessie stretch buster sid
ubuntu_VERSIONS := trusty xenial artful bionic
TARGETS := $(foreach arch,$(ARCHS),$(foreach distro,$(DISTROS),$(foreach version,$($(distro)_VERSIONS),$(distro)-$(version)-$(arch))))
all: $(TARGETS)
.PHONY: $(TARGETS)
$(TARGETS): VENDOR = $(word 1,$(subst -, ,$@))
$(TARGETS): VERSION = $(word 2,$(subst -, ,$@))
$(TARGETS): ARCH = $(subst amd64,,$(subst i386,i386/,$(word 3,$(subst -, ,$@))))
$(TARGETS): SOURCE_IMAGE = $(ARCH)$(VENDOR):$(VERSION)
$(TARGETS): CI_REGISTRY_NAME = bind9:$@
$(TARGETS):
$(info Building $(CI_REGISTRY_IMAGE)/$(CI_REGISTRY_NAME) from $(SOURCE_IMAGE))
mkdir -p docker/bind9/$@
sed \
-e 's,@VERSION@,$(VERSION),' \
-e 's,@ARCH@,$(ARCH),' \
-e 's,@VENDOR@,$(VENDOR),' \
-e 's,@SOURCE_IMAGE@,$(SOURCE_IMAGE),' \
< docker/bind9/$(VENDOR)-template/Dockerfile \
> docker/bind9/$@/Dockerfile
docker build --no-cache -t "$(CI_REGISTRY_IMAGE)/$(CI_REGISTRY_NAME)" "docker/bind9/$@"
docker push "$(CI_REGISTRY_IMAGE)/$(CI_REGISTRY_NAME)"
rm -rf docker/bind9/$@
FROM debian:buster
MAINTAINER BIND 9 Developers <bind9-dev@isc.org>
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get -y update
RUN apt-get -y dist-upgrade
RUN apt-get -y install \
autoconf \
automake \
autotools-dev \
bash-completion \
bison \
build-essential \
git \
libcap2-dev \
libdb-dev \
libgeoip-dev \
libkrb5-dev \
libldap2-dev \
liblmdb-dev \
libnet-dns-perl \
libtool \
libssl-dev \
libxml2-dev \
net-tools \
perl \
pkg-config \
procps \
sudo
FROM i386/debian:buster
MAINTAINER BIND 9 Developers <bind9-dev@isc.org>
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get -y update
RUN apt-get -y dist-upgrade
RUN apt-get -y install \
autoconf \
automake \
autotools-dev \
bash-completion \
bison \
build-essential \
git \
libcap2-dev \
libdb-dev \
libgeoip-dev \
libkrb5-dev \
libldap2-dev \
liblmdb-dev \
libnet-dns-perl \
libtool \
libssl-dev \
libxml2-dev \
net-tools \
perl \
pkg-config \
procps \
sudo
FROM debian:jessie
MAINTAINER BIND 9 Developers <bind9-dev@isc.org>
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get -y update
RUN apt-get -y dist-upgrade
RUN apt-get -y install \
autoconf \
automake \
autotools-dev \
bash-completion \
bison \
build-essential \
git \
libcap2-dev \
libdb-dev \
libgeoip-dev \
libkrb5-dev \
libldap2-dev \
liblmdb-dev \
libnet-dns-perl \
libtool \
libssl-dev \
libxml2-dev \
net-tools \
perl \
pkg-config \
procps \
sudo
FROM debian:jessie
MAINTAINER BIND 9 Developers <bind9-dev@isc.org>
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get -y update
RUN apt-get -y dist-upgrade
RUN apt-get -y install \
autoconf \
automake \
autotools-dev \
bash-completion \
bison \
build-essential \
git \
libcap2-dev \
libdb-dev \
libgeoip-dev \
libkrb5-dev \
libldap2-dev \
liblmdb-dev \
libnet-dns-perl \
libtool \
libssl-dev \
libxml2-dev \
net-tools \
perl \
pkg-config \
procps \
sudo
FROM i386/debian:sid
MAINTAINER BIND 9 Developers <bind9-dev@isc.org>
ENV DEBIAN_FRONTEND noninteractive
ENV ATF_VERSION 0.21
ENV LUTOK_VERSION 0.4
ENV KYUA_VERSION 0.13
RUN apt-get -y update
RUN apt-get -y dist-upgrade
RUN apt-get -y install \
autoconf \
automake \
autotools-dev \
bash-completion \
bison \
build-essential \
curl \
git \
libcap2-dev \
libdb-dev \
libgeoip-dev \
libkrb5-dev \
libldap2-dev \
liblmdb-dev \
liblua5.1-0-dev \
liblua5.2-dev \
libnet-dns-perl \
libtool \
libsqlite3-dev \
libssl-dev \
libxml2-dev \
net-tools \
perl \
pkg-config \
procps \
sudo
RUN curl -sSL https://github.com/jmmv/atf/releases/download/atf-$ATF_VERSION/atf-$ATF_VERSION.tar.gz | tar -xz -C /usr/src
RUN cd /usr/src/atf-$ATF_VERSION && ./configure && make && make install
RUN curl -sSL https://github.com/jmmv/lutok/releases/download/lutok-$LUTOK_VERSION/lutok-$LUTOK_VERSION.tar.gz | tar -xz -C /usr/src
RUN cd /usr/src/lutok-$LUTOK_VERSION && ./configure && make && make install
RUN curl -sSL https://github.com/jmmv/kyua/releases/download/kyua-$KYUA_VERSION/kyua-$KYUA_VERSION.tar.gz | tar -xz -C /usr/src
RUN cd /usr/src/kyua-$KYUA_VERSION && ./configure && make && make install
RUN ldconfig
FROM debian:stretch
MAINTAINER BIND 9 Developers <bind9-dev@isc.org>
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get -y update
RUN apt-get -y dist-upgrade
RUN apt-get -y install \
autoconf \
automake \
autotools-dev \
bash-completion \
bison \
build-essential \
git \
libcap2-dev \
libdb-dev \
libgeoip-dev \
libkrb5-dev \
libldap2-dev \
liblmdb-dev \
libnet-dns-perl \
libtool \
libssl-dev \
libxml2-dev \
net-tools \
perl \
pkg-config \
procps \
sudo
FROM i386/debian:stretch
MAINTAINER BIND 9 Developers <bind9-dev@isc.org>
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get -y update
RUN apt-get -y dist-upgrade
RUN apt-get -y install \
autoconf \
automake \
autotools-dev \
bash-completion \
bison \
build-essential \
git \
libcap2-dev \
libdb-dev \
libgeoip-dev \
libkrb5-dev \
libldap2-dev \
liblmdb-dev \
libnet-dns-perl \
libtool \
libssl-dev \
libxml2-dev \
net-tools \
perl \
pkg-config \
procps \
sudo
FROM debian:sid FROM @SOURCE_IMAGE@
MAINTAINER BIND 9 Developers <bind9-dev@isc.org> MAINTAINER BIND 9 Developers <bind9-dev@isc.org>
ENV DEBIAN_FRONTEND noninteractive ENV DEBIAN_FRONTEND noninteractive
ENV ATF_VERSION 0.21 ENV ATF_VERSION 0.21
......
FROM ubuntu:artful
MAINTAINER BIND 9 Developers <bind9-dev@isc.org>
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get -y update
RUN apt-get -y dist-upgrade
RUN apt-get -y install \
autoconf \
automake \
autotools-dev \
bash-completion \
bison \
build-essential \
git \
libcap2-dev \
libdb-dev \
libgeoip-dev \
libkrb5-dev \
libldap2-dev \
liblmdb-dev \
libnet-dns-perl \
libtool \
libssl-dev \
libxml2-dev \
net-tools \
perl \
pkg-config \
procps \
sudo
FROM i386/ubuntu:artful
MAINTAINER BIND 9 Developers <bind9-dev@isc.org>
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get -y update
RUN apt-get -y dist-upgrade
RUN apt-get -y install \
autoconf \
automake \
autotools-dev \
bash-completion \
bison \
build-essential \
git \
libcap2-dev \
libdb-dev \
libgeoip-dev \
libkrb5-dev \
libldap2-dev \
liblmdb-dev \
libnet-dns-perl \
libtool \
libssl-dev \
libxml2-dev \
net-tools \
perl \
pkg-config \
procps \
sudo
debian-template/
\ No newline at end of file
FROM ubuntu:trusty
MAINTAINER BIND 9 Developers <bind9-dev@isc.org>
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get -y update
RUN apt-get -y dist-upgrade
RUN apt-get -y install \
autoconf \
automake \
autotools-dev \
bash-completion \
bison \
build-essential \
git \
libcap2-dev \
libdb-dev \
libgeoip-dev \
libkrb5-dev \
libldap2-dev \
liblmdb-dev \
libnet-dns-perl \
libtool \
libssl-dev \
libxml2-dev \
net-tools \
perl \
pkg-config \
procps \
sudo
FROM i386/ubuntu:trusty
MAINTAINER BIND 9 Developers <bind9-dev@isc.org>
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get -y update
RUN apt-get -y dist-upgrade
RUN apt-get -y install \
autoconf \
automake \
autotools-dev \
bash-completion \
bison \
build-essential \
git \
libcap2-dev \
libdb-dev \
libgeoip-dev \
libkrb5-dev \
libldap2-dev \
liblmdb-dev \
libnet-dns-perl \
libtool \
libssl-dev \
libxml2-dev \
net-tools \
perl \
pkg-config \
procps \
sudo
FROM ubuntu:xenial
MAINTAINER BIND 9 Developers <bind9-dev@isc.org>
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get -y update
RUN apt-get -y dist-upgrade
RUN apt-get -y install \
autoconf \
automake \
autotools-dev \
bash-completion \
bison \
build-essential \
git \
libcap2-dev \
libdb-dev \
libgeoip-dev \
libkrb5-dev \
libldap2-dev \
liblmdb-dev \
libnet-dns-perl \
libtool \
libssl-dev \
libxml2-dev \
net-tools \
perl \
pkg-config \
procps \
sudo
FROM i386/ubuntu:xenial
MAINTAINER BIND 9 Developers <bind9-dev@isc.org>
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get -y update
RUN apt-get -y dist-upgrade
RUN apt-get -y install \
autoconf \
automake \
autotools-dev \
bash-completion \
bison \
build-essential \
git \
libcap2-dev \
libdb-dev \
libgeoip-dev \
libkrb5-dev \
libldap2-dev \
liblmdb-dev \
libnet-dns-perl \
libtool \
libssl-dev \
libxml2-dev \
net-tools \
perl \
pkg-config \
procps \
sudo
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment