Commit c47ec0b2 authored by Erick Hitter's avatar Erick Hitter

Merge branch '2-automated-builds' into 'master'

Automated image builds for registry

Closes #2, #3, and #1

See merge request !5
parents a307cf2e 5025cfee
Pipeline #520 passed with stages
in 26 minutes and 58 seconds
image: docker:latest
services:
- docker:dind
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
#
# TESTS
#
lint_dockerfile:
stage: test
image: hadolint/hadolint:latest-debian
before_script:
- mkdir ~/.config
- cp ./.hadolint.yaml ~/.config/hadolint.yaml
script:
- find . -name "Dockerfile" -execdir hadolint {} \;
#
# IMAGE BUILDS/PUSHES
#
# Golang
build-golang-master:
stage: deploy
script:
- docker build --pull -t "$CI_REGISTRY_IMAGE/golang:latest" ./golang/latest
- docker push "$CI_REGISTRY_IMAGE/golang:latest"
only:
- master
when: manual
build-golang-dev:
stage: deploy
script:
- docker build --pull -t "$CI_REGISTRY_IMAGE/golang:latest-dev" ./golang/latest
- docker push "$CI_REGISTRY_IMAGE/golang:latest-dev"
except:
- master
# PHP 7.3
build-php-7.3-master:
stage: deploy
script:
- docker build --pull -t "$CI_REGISTRY_IMAGE/php:7.3" ./php/7.3
- docker push "$CI_REGISTRY_IMAGE/php:7.3"
only:
- master
when: manual
build-php-7.3-dev:
stage: deploy
script:
- docker build --pull -t "$CI_REGISTRY_IMAGE/php:7.3-dev" ./php/7.3
- docker push "$CI_REGISTRY_IMAGE/php:7.3-dev"
except:
- master
# PHP 7.2
build-php-7.2-master:
stage: deploy
script:
- docker build --pull -t "$CI_REGISTRY_IMAGE/php:7.2" ./php/7.2
- docker push "$CI_REGISTRY_IMAGE/php:7.2"
only:
- master
when: manual
build-php-7.2-dev:
stage: deploy
script:
- docker build --pull -t "$CI_REGISTRY_IMAGE/php:7.2-dev" ./php/7.2
- docker push "$CI_REGISTRY_IMAGE/php:7.2-dev"
except:
- master
# PHP 7.1
build-php-7.1-master:
stage: deploy
script:
- docker build --pull -t "$CI_REGISTRY_IMAGE/php:7.1" ./php/7.1
- docker push "$CI_REGISTRY_IMAGE/php:7.1"
only:
- master
when: manual
build-php-7.1-dev:
stage: deploy
script:
- docker build --pull -t "$CI_REGISTRY_IMAGE/php:7.1-dev" ./php/7.1
- docker push "$CI_REGISTRY_IMAGE/php:7.1-dev"
except:
- master
# PHP 7.0
build-php-7.0-master:
stage: deploy
script:
- docker build --pull -t "$CI_REGISTRY_IMAGE/php:7.0" ./php/7.0
- docker push "$CI_REGISTRY_IMAGE/php:7.0"
only:
- master
when: manual
build-php-7.0-dev:
stage: deploy
script:
- docker build --pull -t "$CI_REGISTRY_IMAGE/php:7.0-dev" ./php/7.0
- docker push "$CI_REGISTRY_IMAGE/php:7.0-dev"
except:
- master
allow_failure: true
# PHP 5.6
build-php-5.6-master:
stage: deploy
script:
- docker build --pull -t "$CI_REGISTRY_IMAGE/php:5.6" ./php/5.6
- docker push "$CI_REGISTRY_IMAGE/php:5.6"
only:
- master
when: manual
build-php-5.6-dev:
stage: deploy
script:
- docker build --pull -t "$CI_REGISTRY_IMAGE/php:5.6-dev" ./php/5.6
- docker push "$CI_REGISTRY_IMAGE/php:5.6-dev"
except:
- master
allow_failure: true
# PHP 5.3
build-php-5.3-master:
stage: deploy
script:
- docker build --pull -t "$CI_REGISTRY_IMAGE/php:5.3" ./php/5.3
- docker push "$CI_REGISTRY_IMAGE/php:5.3"
only:
- master
when: manual
build-php-5.3-dev:
stage: deploy
script:
- docker build --pull -t "$CI_REGISTRY_IMAGE/php:5.3-dev" ./php/5.3
- docker push "$CI_REGISTRY_IMAGE/php:5.3-dev"
except:
- master
allow_failure: true
ignored:
- DL3007
- DL3008
Docker Images
=============
# Docker Images [![pipeline status](https://git.ethitter.com/docker/images/badges/master/pipeline.svg)](https://git.ethitter.com/docker/images/commits/master)
A collection of images used with GitLab CI
\ No newline at end of file
A collection of images used with GitLab CI, built using GitLab CI. ♾
## Use
See this project's container registry for available images.
# Base image: https://hub.docker.com/_/golang/
FROM golang:latest
MAINTAINER ethitter
LABEL maintainer="ethitter"
LABEL version="1.0"
# Install golint
ENV GOPATH /go
......@@ -8,9 +10,11 @@ ENV PATH ${GOPATH}/bin:$PATH
RUN go get -u github.com/golang/lint/golint
# Add apt key for LLVM repository
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
# Add LLVM apt repository
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN echo "deb http://apt.llvm.org/stretch/ llvm-toolchain-stretch-5.0 main" | tee -a /etc/apt/sources.list
# Install clang from LLVM repository
......@@ -21,4 +25,5 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
# Set Clang as default CC
ENV set_clang /etc/profile.d/set-clang-cc.sh
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN echo "export CC=clang-5.0" | tee -a ${set_clang} && chmod a+x ${set_clang}
FROM tetraweb/php:5.3
MAINTAINER ethitter
RUN apt-get update && apt-get -yqqf install lsb-release zip unzip subversion mysql-client libicu-dev libpng-dev libbz2-dev libmysqlclient-dev libfreetype6-dev libjpeg-dev libxpm-dev --fix-missing
LABEL maintainer="ethitter"
LABEL version="1.0"
RUN apt-get update \
&& apt-get -yqqf install lsb-release zip unzip subversion mysql-client libicu-dev libpng-dev libbz2-dev libmysqlclient-dev libfreetype6-dev libjpeg-dev libxpm-dev --fix-missing --no-install-recommends \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN docker-php-ext-install mbstring mysqli intl gd zip bz2
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
RUN chmod +x /usr/local/bin/composer
......
FROM php:5.6-stretch
MAINTAINER ethitter
RUN apt-get update && apt-get -yqqf install lsb-release zip unzip subversion mysql-client libicu-dev libpng-dev libbz2-dev default-libmysqlclient-dev --fix-missing
LABEL maintainer="ethitter"
LABEL version="1.0"
RUN apt-get update \
&& apt-get -yqqf install lsb-release zip unzip subversion mysql-client libicu-dev libpng-dev libbz2-dev default-libmysqlclient-dev --fix-missing --no-install-recommends \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN docker-php-ext-install mbstring mysqli intl gd zip bz2
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
RUN chmod +x /usr/local/bin/composer
......
FROM php:7.0-stretch
MAINTAINER ethitter
RUN apt-get update && apt-get -yqqf install lsb-release zip unzip subversion mysql-client libicu-dev libpng-dev libbz2-dev default-libmysqlclient-dev --fix-missing
LABEL maintainer="ethitter"
LABEL version="1.0"
RUN apt-get update \
&& apt-get -yqqf install lsb-release zip unzip subversion mysql-client libicu-dev libpng-dev libbz2-dev default-libmysqlclient-dev --fix-missing --no-install-recommends \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN docker-php-ext-install mbstring mysqli intl gd zip bz2
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
RUN chmod +x /usr/local/bin/composer
......
FROM php:7.1-stretch
MAINTAINER ethitter
RUN apt-get update && apt-get -yqqf install lsb-release zip unzip subversion mysql-client libicu-dev libpng-dev libbz2-dev default-libmysqlclient-dev --fix-missing
LABEL maintainer="ethitter"
LABEL version="1.0"
RUN apt-get update \
&& apt-get -yqqf install lsb-release zip unzip subversion mysql-client libicu-dev libpng-dev libbz2-dev default-libmysqlclient-dev --fix-missing --no-install-recommends \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN docker-php-ext-install mbstring mysqli intl gd zip bz2
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
RUN chmod +x /usr/local/bin/composer
......
FROM php:7.2-stretch
MAINTAINER ethitter
RUN apt-get update && apt-get -yqqf install lsb-release zip unzip subversion mysql-client libicu-dev libpng-dev libbz2-dev default-libmysqlclient-dev --fix-missing
LABEL maintainer="ethitter"
LABEL version="1.0"
RUN apt-get update \
&& apt-get -yqqf install lsb-release zip unzip subversion mysql-client libicu-dev libpng-dev libbz2-dev default-libmysqlclient-dev --fix-missing --no-install-recommends \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN docker-php-ext-install mbstring mysqli intl gd zip bz2
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
RUN chmod +x /usr/local/bin/composer
......
FROM php:7.3-stretch
MAINTAINER ethitter
RUN apt-get update && apt-get -yqqf install lsb-release zip unzip subversion mysql-client libicu-dev libpng-dev libbz2-dev default-libmysqlclient-dev libzip-dev --fix-missing
LABEL maintainer="ethitter"
LABEL version="1.0"
RUN apt-get update \
&& apt-get -yqqf install lsb-release zip unzip subversion mysql-client libicu-dev libpng-dev libbz2-dev default-libmysqlclient-dev libzip-dev --fix-missing --no-install-recommends \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN docker-php-ext-install mbstring mysqli intl gd zip bz2
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
RUN chmod +x /usr/local/bin/composer
......
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