I've also tried adding refreshing of the database
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
FROM alpine:latest
|
FROM alpine:latest
|
||||||
|
|
||||||
RUN apk update && \
|
RUN apk update && \
|
||||||
apk add python3 py3-pip su-exec curl wget && \
|
apk add python3 py3-pip su-exec curl wget unzip && \
|
||||||
mkdir -p /netflowParser
|
mkdir -p /netflowParser
|
||||||
|
|
||||||
WORKDIR /netflowParser
|
WORKDIR /netflowParser
|
||||||
@@ -10,6 +10,7 @@ WORKDIR /netflowParser
|
|||||||
|
|
||||||
COPY ../Code/* /netflowParser/
|
COPY ../Code/* /netflowParser/
|
||||||
COPY ./entrypoint.sh /entrypoint.sh
|
COPY ./entrypoint.sh /entrypoint.sh
|
||||||
|
COPY ./updateIP2Lbin.sh /netflowParser/
|
||||||
|
|
||||||
RUN chmod +x /entrypoint.sh
|
RUN chmod +x /entrypoint.sh
|
||||||
|
|
||||||
|
|||||||
29
Docker/Dockerfile/updateIP2Lbin.sh
Executable file
29
Docker/Dockerfile/updateIP2Lbin.sh
Executable file
@@ -0,0 +1,29 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# -----------------------------
|
||||||
|
# IP2Location DB1 Updater
|
||||||
|
# -----------------------------
|
||||||
|
|
||||||
|
# Change this URL to your personal download link if needed
|
||||||
|
DOWNLOAD_URL="https://www.ip2location.com/download/?token="$IP2LOC_TOKEN"&file=DB9LITEBIN"
|
||||||
|
|
||||||
|
# Define filenames
|
||||||
|
ZIP_FILE="IP2LOCATION-LITE-DB9.BIN.ZIP"
|
||||||
|
BIN_FILE="IP2LOCATION-LITE-DB9.BIN"
|
||||||
|
|
||||||
|
echo "Downloading latest IP2Location DB1..."
|
||||||
|
wget -O "$CHOWNPATH"/"$BIN_FILE"
|
||||||
|
|
||||||
|
echo "Unzipping BIN file..."
|
||||||
|
unzip -o "$ZIP_FILE"
|
||||||
|
|
||||||
|
if [ ! -f "$BIN_FILE" ]; then
|
||||||
|
echo "Unzip failed or $BIN_FILE not found."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Cleaning up ZIP..."
|
||||||
|
rm "$ZIP_FILE"
|
||||||
|
|
||||||
|
echo "Update complete. BIN file ready: $BIN_FILE"
|
||||||
|
|
||||||
Reference in New Issue
Block a user