Script improvements
This commit is contained in:
parent
049ac2a686
commit
779cea5645
31
Makefile
31
Makefile
@ -24,6 +24,24 @@ DOCKER_REGISTRY = registry.wojciechkozlowski.eu/wojtek/loki
|
||||
|
||||
default: all
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# base
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
base-clean:
|
||||
docker rmi $(DOCKER_REGISTRY)/base || /bin/true
|
||||
|
||||
base-build:
|
||||
docker-compose build base
|
||||
|
||||
base-push:
|
||||
docker-compose push base
|
||||
|
||||
base-pull:
|
||||
docker-compose pull base
|
||||
|
||||
base: base-clean base-build base-push
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# wiki
|
||||
# -----------------------------------------------------------------------------
|
||||
@ -31,7 +49,7 @@ default: all
|
||||
wiki-clean:
|
||||
docker rmi $(DOCKER_REGISTRY)/wiki || /bin/true
|
||||
|
||||
wiki-build:
|
||||
wiki-build: base-build
|
||||
docker-compose build wiki
|
||||
|
||||
wiki-push:
|
||||
@ -85,7 +103,7 @@ proxy: proxy-clean proxy-build proxy-push
|
||||
certbot-clean:
|
||||
docker rmi $(DOCKER_REGISTRY)/certbot || /bin/true
|
||||
|
||||
certbot-build:
|
||||
certbot-build: base-build
|
||||
docker-compose build certbot
|
||||
|
||||
certbot-push:
|
||||
@ -105,7 +123,7 @@ certbot: certbot-clean certbot-build certbot-push
|
||||
runner-base-clean:
|
||||
docker rmi $(DOCKER_REGISTRY)/runner-base || /bin/true
|
||||
|
||||
runner-base-build:
|
||||
runner-base-build: base-build
|
||||
docker build -f runner/Dockerfile \
|
||||
-t $(DOCKER_REGISTRY)/runner-base \
|
||||
./runner
|
||||
@ -177,10 +195,11 @@ runners: runners-clean runners-build runners-push
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
clean-all:
|
||||
yes | docker container prune
|
||||
yes | docker image prune -a
|
||||
docker container prune -f
|
||||
docker image prune -a -f
|
||||
|
||||
clean-builds: \
|
||||
base-clean \
|
||||
wiki-clean \
|
||||
nextcloud-cron-clean \
|
||||
proxy-clean \
|
||||
@ -189,7 +208,7 @@ clean-builds: \
|
||||
runner-main-clean \
|
||||
runner-docker-clean
|
||||
|
||||
build-all: runner-base-build
|
||||
build-all: base-build runner-base-build
|
||||
docker-compose build
|
||||
|
||||
push-all:
|
||||
|
11
base/Dockerfile
Normal file
11
base/Dockerfile
Normal file
@ -0,0 +1,11 @@
|
||||
FROM debian
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
RUN apt-get update && apt-get -y upgrade
|
||||
|
||||
RUN apt-get -y install \
|
||||
build-essential \
|
||||
python3 \
|
||||
python3-pip \
|
||||
python \
|
||||
python-pip
|
@ -1,6 +1,6 @@
|
||||
FROM debian
|
||||
FROM registry.wojciechkozlowski.eu/wojtek/loki/base
|
||||
|
||||
RUN apt update && apt install -y certbot cron supervisor
|
||||
RUN apt-get -y install certbot cron supervisor
|
||||
|
||||
ADD certbot.cron /etc/cron.d/certbot
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
FROM debian
|
||||
FROM registry.wojciechkozlowski.eu/wojtek/loki/base
|
||||
|
||||
ENV HTML_PATH /usr/share/nginx/html
|
||||
ENV DOKU_VOL /var/dokuwiki-storage
|
||||
|
||||
RUN apt update && apt install -y wget php7.0-fpm php7.0-xml nginx supervisor
|
||||
RUN apt-get -y install wget php7.0-fpm php7.0-xml nginx supervisor
|
||||
|
||||
RUN sed -i -e "s|cgi.fix_pathinfo=1|cgi.fix_pathinfo=0|g" /etc/php/7.0/fpm/php.ini && \
|
||||
mkdir /run/php
|
||||
|
@ -1,6 +1,6 @@
|
||||
FROM nextcloud:fpm
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
RUN apt-get update && apt-get -y upgrade && apt-get -y install \
|
||||
supervisor \
|
||||
cron \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM nginx
|
||||
|
||||
RUN apt update && apt install -y openssl
|
||||
RUN mkdir /etc/nginx/cert && openssl dhparam -out /etc/nginx/cert/dhparam.pem 2048
|
||||
RUN apt-get update && apt-get -y upgrade && apt -y install openssl
|
||||
RUN mkdir /etc/nginx/cert && openssl dhparam -out /etc/nginx/cert/dhparam.pem 2048
|
||||
|
@ -1,15 +1,11 @@
|
||||
FROM debian
|
||||
FROM registry.wojciechkozlowski.eu/wojtek/loki/base
|
||||
|
||||
# Add files to setup GitLab repo
|
||||
ADD script.deb.sh /tmp/script.deb.sh
|
||||
ADD pin-gitlab-runner.pref /etc/apt/preferences.d/pin-gitlab-runner.pref
|
||||
|
||||
# Update
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
RUN apt update && apt upgrade -y
|
||||
|
||||
# Install gitlab-runner
|
||||
RUN apt install -y gnupg2 && bash /tmp/script.deb.sh && apt install -y gitlab-runner
|
||||
RUN apt-get -y install gnupg2 && bash /tmp/script.deb.sh && apt-get -y install gitlab-runner
|
||||
|
||||
# Preserve runner's data
|
||||
VOLUME ["/etc/gitlab-runner", "/home/gitlab-runner"]
|
||||
|
@ -1,10 +1,11 @@
|
||||
FROM registry.wojciechkozlowski.eu/wojtek/loki/runner-base
|
||||
|
||||
RUN apt install -y apt-transport-https \
|
||||
ca-certificates \
|
||||
curl \
|
||||
gnupg2 \
|
||||
software-properties-common
|
||||
RUN apt-get -y install \
|
||||
apt-transport-https \
|
||||
ca-certificates \
|
||||
curl \
|
||||
gnupg2 \
|
||||
software-properties-common
|
||||
|
||||
RUN curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gpg | apt-key add -
|
||||
|
||||
@ -13,6 +14,6 @@ RUN add-apt-repository \
|
||||
$(lsb_release -cs) \
|
||||
stable"
|
||||
|
||||
RUN apt update && apt install -y docker-ce docker-compose
|
||||
RUN apt-get update && apt-get -y install docker-ce docker-compose
|
||||
|
||||
ENV DOCKER_HOST "tcp://docker:2375"
|
||||
|
@ -1,7 +1,3 @@
|
||||
FROM registry.wojciechkozlowski.eu/wojtek/loki/runner-base
|
||||
|
||||
RUN apt install -y build-essential \
|
||||
python3 \
|
||||
python3-pip
|
||||
|
||||
RUN pip3 install pycodestyle coverage
|
||||
|
Reference in New Issue
Block a user