Skip to content

Commit ab36efa

Browse files
author
Adekunle Ibitayo
committed
downloading GEOIP DB it's new licensekey
1 parent bd629dc commit ab36efa

File tree

3 files changed

+21
-4
lines changed

3 files changed

+21
-4
lines changed

.drone.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,21 @@
11
workspace:
22
base: /workdir
3-
3+
44
pipeline:
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:

Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ FROM quay.io/ukhomeofficedigital/centos-base:latest
22
MAINTAINER Lewis Marshall <[email protected]>
33

44
WORKDIR /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+
510
ADD ./build.sh /root/
611
RUN ./build.sh
712

@@ -47,4 +52,4 @@ EXPOSE 10080 10443
4752

4853
USER 1000
4954

50-
ENTRYPOINT [ "/go.sh" ]
55+
ENTRYPOINT [ "/go.sh" ]

build.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ mkdir -p ${MAXMIND_PATH}
5050
./configure
5151
make check install
5252
echo "/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
5553
chown -R 1000:1000 ${MAXMIND_PATH}
5654
popd
5755

0 commit comments

Comments
 (0)