mirror of
https://github.com/casjaysdevdocker/ifconfig
synced 2025-01-18 06:34:22 -05:00
🗃️ Committing everything that changed 🗃️
Dockerfile rootfs/usr/local/etc/docker/init.d/ifconfig.sh rootfs/usr/local/etc/docker/init.d/zz-ifconfig.sh
This commit is contained in:
parent
9574861597
commit
b2ad9a06ff
13
Dockerfile
13
Dockerfile
@ -28,9 +28,9 @@ FROM golang:1.15-buster AS src
|
||||
ENV GO111MODULE=on CGO_ENABLED=0
|
||||
WORKDIR /go/src/github.com/mpolden/echoip
|
||||
RUN apt update && apt install -yy git
|
||||
RUN git clone -q https://github.com/mpolden/echoip /go/src/github.com/mpolden/echoip
|
||||
RUN cd /go/src/github.com/mpolden/echoip && make
|
||||
RUN git clone -q https://github.com/mpolden/echoip /go/src/github.com/mpolden/echoip && cd /go/src/github.com/mpolden/echoip && make
|
||||
|
||||
FROM mpolden/echoip:latest as html
|
||||
FROM tianon/gosu:latest AS gosu
|
||||
FROM ${IMAGE_REPO}:${DISTRO_VERSION} AS build
|
||||
ARG USER
|
||||
@ -65,12 +65,13 @@ USER ${USER}
|
||||
WORKDIR /root
|
||||
|
||||
RUN set -ex ; \
|
||||
echo ""
|
||||
mkdir -p "/opt/echoip"
|
||||
|
||||
COPY --from=src /go/bin/echoip /opt/echoip/
|
||||
COPY --from=gosu /usr/local/bin/gosu /usr/local/bin/gosu
|
||||
COPY ./rootfs/. /
|
||||
COPY --from=html /opt/echoip/. /opt/echoip/
|
||||
COPY --from=src /go/bin/echoip /opt/echoip/
|
||||
COPY ./Dockerfile /root/Dockerfile
|
||||
COPY ./rootfs/. /
|
||||
|
||||
RUN set -ex ; \
|
||||
echo ""
|
||||
@ -143,7 +144,7 @@ ARG DISTRO_VERSION
|
||||
ARG PHP_VERSION
|
||||
|
||||
USER ${USER}
|
||||
WORKDIR /root
|
||||
WORKDIR /opt/echoip
|
||||
|
||||
LABEL maintainer="CasjaysDev <docker-admin@casjaysdev.pro>"
|
||||
LABEL org.opencontainers.image.vendor="CasjaysDev"
|
||||
|
@ -90,7 +90,7 @@ RUN_DIR="/run/ifconfig" # set scripts pid dir
|
||||
LOG_DIR="/data/logs/ifconfig" # set log directory
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Set the working dir
|
||||
WORK_DIR="" # set working directory
|
||||
WORK_DIR="/opt/echoip" # set working directory
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Where to save passwords to
|
||||
ROOT_FILE_PREFIX="/config/secure/auth/root" # directory to save username/password for root user
|
||||
@ -105,7 +105,7 @@ user_name="${IFCONFIG_USER_NAME:-}" # normal user name
|
||||
user_pass="${IFCONFIG_USER_PASS_WORD:-}" # normal user password
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# port which service is listening on
|
||||
SERVICE_PORT=""
|
||||
SERVICE_PORT="8080"
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# User to use to launch service - IE: postgres
|
||||
RUNAS_USER="root" # normally root
|
||||
@ -119,13 +119,13 @@ SERVICE_UID="0" # set the user id
|
||||
SERVICE_GID="0" # set the group id
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# execute command variables - keep single quotes variables will be expanded later
|
||||
EXEC_CMD_BIN='echoip' # command to execute
|
||||
EXEC_CMD_ARGS='-t /opt/echoip/html ' # command arguments
|
||||
EXEC_CMD_ARGS+='-H x-forwarded-for -r -s -p ' # command arguments
|
||||
EXEC_CMD_ARGS+='-a /opt/echoip/geoip/GeoLite2-ASN.mmdb ' # command arguments
|
||||
EXEC_CMD_ARGS+='-c /opt/echoip/geoip/GeoLite2-City.mmdb ' # command arguments
|
||||
EXEC_CMD_ARGS+='-f /opt/echoip/geoip/GeoLite2-Country.mmdb ' # command arguments
|
||||
EXEC_PRE_SCRIPT='' # execute script before
|
||||
EXEC_CMD_BIN='ifconfig' # command to execute
|
||||
EXEC_CMD_ARGS='-H x-forwarded-for -r -s -p ' # command arguments
|
||||
EXEC_CMD_ARGS+='-l $SERVICE_PORT -t /opt/echoip/html ' # command arguments
|
||||
EXEC_CMD_ARGS+='-a /opt/echoip/geoip/GeoLite2-ASN.mmdb ' # command arguments
|
||||
EXEC_CMD_ARGS+='-c /opt/echoip/geoip/GeoLite2-City.mmdb ' # command arguments
|
||||
EXEC_CMD_ARGS+='-f /opt/echoip/geoip/GeoLite2-Country.mmdb ' # command arguments
|
||||
EXEC_PRE_SCRIPT='' # execute script before
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Is this service a web server
|
||||
IS_WEB_SERVER="no"
|
||||
@ -171,7 +171,7 @@ __update_conf_files() {
|
||||
local sysname="${SERVER_NAME:-${FULL_DOMAIN_NAME:-$HOSTNAME}}" # set hostname
|
||||
|
||||
# CD into temp to bybass any permission errors
|
||||
cd /tmp || false # lets keep shellcheck happy by adding false
|
||||
#cd /tmp || false # lets keep shellcheck happy by adding false
|
||||
|
||||
# delete files
|
||||
#__rm ""
|
Loading…
x
Reference in New Issue
Block a user