Debian Codegraph @

scripts/docker/dists/alpine/Dockerfile

raw
1 # Auto generated for alpine
2 # from scripts/docker/m4/Dockerfile.alpine.m4
3 #
4 # Rebuild this file with `make docker.alpine.regen`
5 #
6 ARG from=alpine:3.23
7 FROM ${from} AS build
8
9 #
10 # Install build tools
11 #
12 RUN apk update
13 RUN apk add git gcc make
14
15 #
16 # Create build directory
17 #
18 RUN mkdir -p /usr/local/src/repositories/freeradius-server
19 WORKDIR /usr/local/src/repositories/freeradius-server/
20
21 #
22 # Copy the FreeRADIUS directory in
23 #
24 COPY . .
25
26 #
27 # Clean up tree - we want to build from the latest commit, not from
28 # any cruft left around on the local system
29 #
30 RUN git clean -fdxx \
31 && git reset --hard HEAD
32
33 ARG release
34 RUN [ -z "$release" ] || git checkout ${release} ; \
35 git status ; \
36 git log -1 --oneline
37
38
39 #
40 # Install build dependencies
41 #
42 # essential
43 RUN apk add libc-dev talloc-dev
44 RUN apk add openssl openssl-dev
45 RUN apk add linux-headers
46 # general
47 RUN apk add pcre-dev libidn-dev krb5-dev samba-dev curl-dev json-c-dev
48 RUN apk add openldap-dev unbound-dev
49 # languages
50 RUN apk add ruby-dev perl-dev python3-dev
51 # databases
52 RUN apk add hiredis-dev libmemcached-dev gdbm-dev
53 # sql
54 RUN apk add postgresql-dev mariadb-dev unixodbc-dev sqlite-dev
55
56 #
57 # Build the server
58 #
59 RUN ./configure --prefix=/opt
60 RUN make -j2
61 RUN make install
62 RUN rm /opt/lib/*.a
63
64 #
65 # Clean environment and run the server
66 #
67 FROM ${from}
68 COPY --from=build /opt /opt
69
70 #
71 # These are needed for the server to start
72 #
73 RUN apk update \
74 && apk add talloc libressl pcre libwbclient tzdata \
75 \
76 #
77 # Libraries that are needed dependent on which modules are used
78 # Some of these (especially the languages) are huge. A reasonable
79 # selection has been enabled here. If you use modules needing
80 # other dependencies then install any others required in your
81 # local Dockerfile.
82 #
83 && apk add libcurl json-c libldap hiredis sqlite-dev \
84 #RUN apk add libidn krb5
85 #RUN apk add unbound-libs
86 #RUN apk add ruby-libs perl python3-dev
87 #RUN apk add libmemcached gdbm
88 #RUN apk add postgresql-dev mariadb-dev unixodbc-dev
89 \
90 && ln -s /opt/etc/raddb /etc/raddb
91
92 WORKDIR /
93 COPY scripts/docker//etc/docker-entrypoint.sh.alpine docker-entrypoint.sh
94 RUN chmod +x docker-entrypoint.sh
95
96 EXPOSE 1812/udp 1813/udp
97 ENTRYPOINT ["/docker-entrypoint.sh"]
98 CMD ["radiusd"]