diff options
Diffstat (limited to '')
-rwxr-xr-x | scripts/docker/dists/alpine/docker-entrypoint.sh (renamed from scripts/docker/alpine/docker-entrypoint.sh) | 0 | ||||
-rw-r--r-- | scripts/docker/m4/Dockerfile.alpine.m4 (renamed from scripts/docker/alpine/Dockerfile) | 31 |
2 files changed, 19 insertions, 12 deletions
diff --git a/scripts/docker/alpine/docker-entrypoint.sh b/scripts/docker/dists/alpine/docker-entrypoint.sh index e0f9f6f..e0f9f6f 100755 --- a/scripts/docker/alpine/docker-entrypoint.sh +++ b/scripts/docker/dists/alpine/docker-entrypoint.sh diff --git a/scripts/docker/alpine/Dockerfile b/scripts/docker/m4/Dockerfile.alpine.m4 index 2965525..64c6c8f 100644 --- a/scripts/docker/alpine/Dockerfile +++ b/scripts/docker/m4/Dockerfile.alpine.m4 @@ -1,4 +1,4 @@ -ARG from=alpine:3.13 +ARG from=DOCKER_IMAGE FROM ${from} as build # @@ -10,17 +10,23 @@ RUN apk add git gcc make # # Create build directory # -RUN mkdir -p /usr/local/src/repositories -WORKDIR /usr/local/src/repositories +RUN mkdir -p /usr/local/src/repositories/freeradius-server +WORKDIR /usr/local/src/repositories/freeradius-server/ # -# Shallow clone the FreeRADIUS source +# Copy the FreeRADIUS directory in # -ARG source=https://github.com/FreeRADIUS/freeradius-server.git -ARG release=v3.2.x +COPY . . + +# +# Clean up tree - we want to build from the latest commit, not from +# any cruft left around on the local system +# +RUN git clean -fdxx \ + && git reset --hard HEAD + +RUN [ -z "$release" ] || git checkout ${release} -RUN git clone --depth 1 --single-branch --branch ${release} ${source} -WORKDIR freeradius-server # # Install build dependencies @@ -33,7 +39,7 @@ RUN apk add linux-headers RUN apk add pcre-dev libidn-dev krb5-dev samba-dev curl-dev json-c-dev RUN apk add openldap-dev unbound-dev # languages -RUN apk add ruby-dev perl-dev python2-dev +RUN apk add ruby-dev perl-dev python2-dev python3-dev # databases RUN apk add hiredis-dev libmemcached-dev gdbm-dev libcouchbase-dev # sql @@ -69,14 +75,15 @@ RUN apk update \ && apk add libcurl json-c libldap hiredis sqlite-dev \ #RUN apk add libidn krb5 #RUN apk add unbound-libs -#RUN apk add ruby-libs perl python2-dev +#RUN apk add ruby-libs perl python2-dev python3-dev #RUN apk add libmemcached gdbm libcouchbase #RUN apk add postgresql-dev mariadb-dev unixodbc-dev \ && ln -s /opt/etc/raddb /etc/raddb -COPY docker-entrypoint.sh / -RUN chmod +x /docker-entrypoint.sh +WORKDIR / +COPY DOCKER_TOPDIR/etc/docker-entrypoint.sh.PKG_TYPE docker-entrypoint.sh +RUN chmod +x docker-entrypoint.sh EXPOSE 1812/udp 1813/udp ENTRYPOINT ["/docker-entrypoint.sh"] |