File tree Expand file tree Collapse file tree 3 files changed +21
-4
lines changed
Expand file tree Collapse file tree 3 files changed +21
-4
lines changed Original file line number Diff line number Diff line change 11workspace :
22 base : /workdir
3-
3+
44pipeline :
5+ get_geoip_databases :
6+ image : docker
7+ environment :
8+ - DOCKER_HOST=tcp://172.17.0.1:2375
9+ secrets :
10+ - GEOIP_CITY_URL
11+ - GEOIP_COUNTRY_URL
12+ commands :
13+ - apk add curl
14+ - curl -fSL $${GEOIP_CITY_URL} | gzip -d > GeoLite2-City.mmdb
15+ - curl -fSL $${GEOIP_COUNTRY_URL} | gzip -d > GeoLite2-Country.mmdb
16+ when :
17+ event : push
18+
519 build_and_test_image :
620 image : quay.io/ukhomeofficedigital/centos-base:latest
721 environment :
Original file line number Diff line number Diff line change @@ -2,6 +2,11 @@ FROM quay.io/ukhomeofficedigital/centos-base:latest
22MAINTAINER Lewis Marshall <
[email protected] >
33
44WORKDIR /root
5+ RUN mkdir -p /usr/share/GeoIP
6+
7+ COPY ./GeoLite2-City.mmdb /usr/share/GeoIP/GeoLite2-City.mmdb
8+ COPY ./GeoLite2-Country.mmdb /usr/share/GeoIP/GeoLite2-Country.mmdb
9+
510ADD ./build.sh /root/
611RUN ./build.sh
712
@@ -47,4 +52,4 @@ EXPOSE 10080 10443
4752
4853USER 1000
4954
50- ENTRYPOINT [ "/go.sh" ]
55+ ENTRYPOINT [ "/go.sh" ]
Original file line number Diff line number Diff line change @@ -50,8 +50,6 @@ mkdir -p ${MAXMIND_PATH}
5050./configure
5151make check install
5252echo " /usr/local/lib" >> /etc/ld.so.conf.d/libmaxminddb.conf
53- curl -fSL ${GEOIP_COUNTRY_URL} | gzip -d > ${MAXMIND_PATH} /GeoLite2-Country.mmdb
54- curl -fSL ${GEOIP_CITY_URL} | gzip -d > ${MAXMIND_PATH} /GeoLite2-City.mmdb
5553chown -R 1000:1000 ${MAXMIND_PATH}
5654popd
5755
You can’t perform that action at this time.
0 commit comments