autoconf - automated build
This commit is contained in:
parent
b86ded3d1c
commit
043fcdc136
@ -18,11 +18,9 @@ COPY fail2ban/ /opt/fail2ban
|
|||||||
COPY logs/ /opt/logs
|
COPY logs/ /opt/logs
|
||||||
COPY lua/ /opt/lua
|
COPY lua/ /opt/lua
|
||||||
COPY crowdsec/ /opt/crowdsec
|
COPY crowdsec/ /opt/crowdsec
|
||||||
COPY autoconf/ /opt/autoconf
|
|
||||||
|
|
||||||
RUN apk --no-cache add certbot libstdc++ libmaxminddb geoip pcre yajl fail2ban clamav apache2-utils rsyslog openssl lua libgd go jq mariadb-connector-c bash brotli py3-pip && \
|
RUN apk --no-cache add certbot libstdc++ libmaxminddb geoip pcre yajl fail2ban clamav apache2-utils rsyslog openssl lua libgd go jq mariadb-connector-c bash brotli && \
|
||||||
pip3 install docker && \
|
chmod +x /opt/entrypoint/* /opt/scripts/* && \
|
||||||
chmod +x /opt/entrypoint/* /opt/scripts/* /opt/autoconf/autoconf.py && \
|
|
||||||
mkdir /opt/entrypoint.d && \
|
mkdir /opt/entrypoint.d && \
|
||||||
rm -f /var/log/nginx/* && \
|
rm -f /var/log/nginx/* && \
|
||||||
chown root:nginx /var/log/nginx && \
|
chown root:nginx /var/log/nginx && \
|
||||||
|
|||||||
@ -18,11 +18,9 @@ COPY fail2ban/ /opt/fail2ban
|
|||||||
COPY logs/ /opt/logs
|
COPY logs/ /opt/logs
|
||||||
COPY lua/ /opt/lua
|
COPY lua/ /opt/lua
|
||||||
COPY crowdsec/ /opt/crowdsec
|
COPY crowdsec/ /opt/crowdsec
|
||||||
COPY autoconf/ /opt/autoconf
|
|
||||||
|
|
||||||
RUN apk --no-cache add certbot libstdc++ libmaxminddb geoip pcre yajl fail2ban clamav apache2-utils rsyslog openssl lua libgd go jq mariadb-connector-c bash brotli py3-pip && \
|
RUN apk --no-cache add certbot libstdc++ libmaxminddb geoip pcre yajl fail2ban clamav apache2-utils rsyslog openssl lua libgd go jq mariadb-connector-c bash brotli && \
|
||||||
pip3 install docker && \
|
chmod +x /opt/entrypoint/* /opt/scripts/* && \
|
||||||
chmod +x /opt/entrypoint/* /opt/scripts/* /opt/autoconf/autoconf.py && \
|
|
||||||
mkdir /opt/entrypoint.d && \
|
mkdir /opt/entrypoint.d && \
|
||||||
rm -f /var/log/nginx/* && \
|
rm -f /var/log/nginx/* && \
|
||||||
chown root:nginx /var/log/nginx && \
|
chown root:nginx /var/log/nginx && \
|
||||||
|
|||||||
@ -25,11 +25,9 @@ COPY fail2ban/ /opt/fail2ban
|
|||||||
COPY logs/ /opt/logs
|
COPY logs/ /opt/logs
|
||||||
COPY lua/ /opt/lua
|
COPY lua/ /opt/lua
|
||||||
COPY crowdsec/ /opt/crowdsec
|
COPY crowdsec/ /opt/crowdsec
|
||||||
COPY autoconf/ /opt/autoconf
|
|
||||||
|
|
||||||
RUN apk --no-cache add certbot libstdc++ libmaxminddb geoip pcre yajl fail2ban clamav apache2-utils rsyslog openssl lua libgd go jq mariadb-connector-c bash brotli py3-pip && \
|
RUN apk --no-cache add certbot libstdc++ libmaxminddb geoip pcre yajl fail2ban clamav apache2-utils rsyslog openssl lua libgd go jq mariadb-connector-c bash brotli && \
|
||||||
pip3 install docker && \
|
chmod +x /opt/entrypoint/* /opt/scripts/* && \
|
||||||
chmod +x /opt/entrypoint/* /opt/scripts/* /opt/autoconf/autoconf.py && \
|
|
||||||
mkdir /opt/entrypoint.d && \
|
mkdir /opt/entrypoint.d && \
|
||||||
rm -f /var/log/nginx/* && \
|
rm -f /var/log/nginx/* && \
|
||||||
chown root:nginx /var/log/nginx && \
|
chown root:nginx /var/log/nginx && \
|
||||||
|
|||||||
@ -25,11 +25,9 @@ COPY fail2ban/ /opt/fail2ban
|
|||||||
COPY logs/ /opt/logs
|
COPY logs/ /opt/logs
|
||||||
COPY lua/ /opt/lua
|
COPY lua/ /opt/lua
|
||||||
COPY crowdsec/ /opt/crowdsec
|
COPY crowdsec/ /opt/crowdsec
|
||||||
COPY autoconf/ /opt/autoconf
|
|
||||||
|
|
||||||
RUN apk --no-cache add certbot libstdc++ libmaxminddb geoip pcre yajl fail2ban clamav apache2-utils rsyslog openssl lua libgd go jq mariadb-connector-c bash brotli py3-pip && \
|
RUN apk --no-cache add certbot libstdc++ libmaxminddb geoip pcre yajl fail2ban clamav apache2-utils rsyslog openssl lua libgd go jq mariadb-connector-c bash brotli && \
|
||||||
pip3 install docker && \
|
chmod +x /opt/entrypoint/* /opt/scripts/* && \
|
||||||
chmod +x /opt/entrypoint/* /opt/scripts/* /opt/autoconf/autoconf.py && \
|
|
||||||
mkdir /opt/entrypoint.d && \
|
mkdir /opt/entrypoint.d && \
|
||||||
rm -f /var/log/nginx/* && \
|
rm -f /var/log/nginx/* && \
|
||||||
chown root:nginx /var/log/nginx && \
|
chown root:nginx /var/log/nginx && \
|
||||||
|
|||||||
@ -18,11 +18,9 @@ COPY fail2ban/ /opt/fail2ban
|
|||||||
COPY logs/ /opt/logs
|
COPY logs/ /opt/logs
|
||||||
COPY lua/ /opt/lua
|
COPY lua/ /opt/lua
|
||||||
COPY crowdsec/ /opt/crowdsec
|
COPY crowdsec/ /opt/crowdsec
|
||||||
COPY autoconf/ /opt/autoconf
|
|
||||||
|
|
||||||
RUN apk --no-cache add certbot libstdc++ libmaxminddb geoip pcre yajl fail2ban clamav apache2-utils rsyslog openssl lua libgd go jq mariadb-connector-c bash brotli py3-pip && \
|
RUN apk --no-cache add certbot libstdc++ libmaxminddb geoip pcre yajl fail2ban clamav apache2-utils rsyslog openssl lua libgd go jq mariadb-connector-c bash brotli && \
|
||||||
pip3 install docker && \
|
chmod +x /opt/entrypoint/* /opt/scripts/* && \
|
||||||
chmod +x /opt/entrypoint/* /opt/scripts/* /opt/autoconf/autoconf.py && \
|
|
||||||
mkdir /opt/entrypoint.d && \
|
mkdir /opt/entrypoint.d && \
|
||||||
rm -f /var/log/nginx/* && \
|
rm -f /var/log/nginx/* && \
|
||||||
chown root:nginx /var/log/nginx && \
|
chown root:nginx /var/log/nginx && \
|
||||||
|
|||||||
12
autoconf/hooks/post_push
Normal file
12
autoconf/hooks/post_push
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
curl -Lo manifest-tool https://github.com/estesp/manifest-tool/releases/download/v1.0.3/manifest-tool-linux-amd64
|
||||||
|
chmod +x manifest-tool
|
||||||
|
|
||||||
|
VERSION=$(cat VERSION | tr -d '\n')
|
||||||
|
if [ "$SOURCE_BRANCH" = "dev" ] ; then
|
||||||
|
./manifest-tool push from-args --ignore-missing --platforms linux/amd64,linux/386,linux/arm/v7,linux/arm64/v8 --template bunkerity/bunkerized-nginx-autoconf:dev-ARCHVARIANT --target bunkerity/bunkerized-nginx-autoconf:dev
|
||||||
|
elif [ "$SOURCE_BRANCH" = "master" ] ; then
|
||||||
|
./manifest-tool push from-args --ignore-missing --platforms linux/amd64,linux/386,linux/arm/v7,linux/arm64/v8 --template bunkerity/bunkerized-nginx-autoconf:ARCHVARIANT --target bunkerity/bunkerized-nginx-autoconf:${VERSION}
|
||||||
|
./manifest-tool push from-args --ignore-missing --platforms linux/amd64,linux/386,linux/arm/v7,linux/arm64/v8 --template bunkerity/bunkerized-nginx-autoconf:ARCHVARIANT --target bunkerity/bunkerized-nginx-autoconf:latest
|
||||||
|
fi
|
||||||
5
autoconf/hooks/pre_build
Normal file
5
autoconf/hooks/pre_build
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Register qemu-*-static for all supported processors except the
|
||||||
|
# current one, but also remove all registered binfmt_misc before
|
||||||
|
docker run --rm --privileged multiarch/qemu-user-static:register --reset
|
||||||
@ -3,7 +3,7 @@
|
|||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
def log(event) :
|
def log(event) :
|
||||||
print("[" + str(datetime.datetime.now().replace(microsecond=0)) + "] AUTOCONF - " + event, flush=True)
|
print("[" + str(datetime.datetime.now().replace(microsecond=0)) + "] " + event, flush=True)
|
||||||
|
|
||||||
def replace_in_file(file, old_str, new_str) :
|
def replace_in_file(file, old_str, new_str) :
|
||||||
with open(file) as f :
|
with open(file) as f :
|
||||||
|
|||||||
@ -25,7 +25,7 @@ services:
|
|||||||
- "bunkerized-nginx.AUTOCONF"
|
- "bunkerized-nginx.AUTOCONF"
|
||||||
|
|
||||||
myautoconf:
|
myautoconf:
|
||||||
image: bunkerity/bunkerized-nginx:autoconf
|
image: bunkerity/bunkerized-nginx-autoconf
|
||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||||
|
|||||||
@ -23,7 +23,7 @@ services:
|
|||||||
- USE_REVERSE_PROXY=yes
|
- USE_REVERSE_PROXY=yes
|
||||||
|
|
||||||
myautoconf:
|
myautoconf:
|
||||||
image: bunkerity/bunkerized-nginx:autoconf
|
image: bunkerity/bunkerized-nginx-autoconf
|
||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||||
|
|||||||
@ -3,12 +3,10 @@
|
|||||||
curl -Lo manifest-tool https://github.com/estesp/manifest-tool/releases/download/v1.0.3/manifest-tool-linux-amd64
|
curl -Lo manifest-tool https://github.com/estesp/manifest-tool/releases/download/v1.0.3/manifest-tool-linux-amd64
|
||||||
chmod +x manifest-tool
|
chmod +x manifest-tool
|
||||||
|
|
||||||
echo "$DOCKER_REPO"
|
VERSION=$(cat VERSION | tr -d '\n')
|
||||||
|
if [ "$SOURCE_BRANCH" = "dev" ] ; then
|
||||||
#VERSION=$(cat VERSION | tr -d '\n')
|
./manifest-tool push from-args --ignore-missing --platforms linux/amd64,linux/386,linux/arm/v7,linux/arm64/v8 --template bunkerity/bunkerized-nginx:dev-ARCHVARIANT --target bunkerity/bunkerized-nginx:dev
|
||||||
#if [ "$SOURCE_BRANCH" = "dev" ] ; then
|
elif [ "$SOURCE_BRANCH" = "master" ] ; then
|
||||||
# ./manifest-tool push from-args --ignore-missing --platforms linux/amd64,linux/386,linux/arm/v7,linux/arm64/v8 --template bunkerity/bunkerized-nginx:dev-ARCHVARIANT --target bunkerity/bunkerized-nginx:dev
|
./manifest-tool push from-args --ignore-missing --platforms linux/amd64,linux/386,linux/arm/v7,linux/arm64/v8 --template bunkerity/bunkerized-nginx:ARCHVARIANT --target bunkerity/bunkerized-nginx:${VERSION}
|
||||||
#elif [ "$SOURCE_BRANCH" = "master" ] ; then
|
./manifest-tool push from-args --ignore-missing --platforms linux/amd64,linux/386,linux/arm/v7,linux/arm64/v8 --template bunkerity/bunkerized-nginx:ARCHVARIANT --target bunkerity/bunkerized-nginx:latest
|
||||||
# ./manifest-tool push from-args --ignore-missing --platforms linux/amd64,linux/386,linux/arm/v7,linux/arm64/v8 --template bunkerity/bunkerized-nginx:ARCHVARIANT --target bunkerity/bunkerized-nginx:${VERSION}
|
fi
|
||||||
# ./manifest-tool push from-args --ignore-missing --platforms linux/amd64,linux/386,linux/arm/v7,linux/arm64/v8 --template bunkerity/bunkerized-nginx:ARCHVARIANT --target bunkerity/bunkerized-nginx:latest
|
|
||||||
#fi
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user