-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
65 lines (45 loc) · 1.36 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Use official Alpine release
FROM alpine:3.14.3 as build
# Maintainer
LABEL maintainer="Alex Terrell <[email protected]>"
ENV RADSECVERSION 1.9.1
ENV RADSECURL https://github.com/radsecproxy/radsecproxy/releases/download/${RADSECVERSION}/
ENV RADSECFILENAME radsecproxy-${RADSECVERSION}.tar.gz
# Change working dir
WORKDIR /root
# Update apk
RUN apk update
# Install buildtools
RUN apk add --no-cache make g++ openssl-dev nettle-dev musl-dev
# Create output dir
RUN mkdir output
# Download Radsecproxy source files
RUN wget ${RADSECURL}${RADSECFILENAME}
# Untar Radsecproxy
RUN tar xf ${RADSECFILENAME} --strip-components=1
# Configure
RUN ./configure --prefix=/root/output --sysconfdir=/etc
# Make and install to output dir
RUN make && make install
# --- --- ---
# Create Radsecproxy container
FROM alpine:3.14.3
# Update apk
RUN apk update
# Install openssl, ca-certificates, nettle and tini
RUN apk add --no-cache openssl ca-certificates bash nettle tini python3
# Copy from 'build' stage
COPY --from=build /root/output/ /
# Copy start.sh
COPY --chown=root:root start.sh get_certs.py csclient.py /root
RUN mkdir /etc/pki/
RUN mkdir /etc/pki/radsecproxy/
# Make start.sh executeable
RUN chmod u+x /root/start.sh
# Make Radsecproxy's ports available
EXPOSE 1812
EXPOSE 1813
# Set Tini entrypoint
ENTRYPOINT ["/sbin/tini", "--"]
# Start Radsecproxy
CMD ["/root/start.sh"]