Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
docker-ocserv
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
docker-ocserv
Commits
1a363d5e
Commit
1a363d5e
authored
Feb 15, 2015
by
Tommy Lau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use debian:jessie as base image and reduced ~144MB for final image
parent
4a2eae0d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
15 deletions
+28
-15
Dockerfile
Dockerfile
+28
-15
No files found.
Dockerfile
View file @
1a363d5e
FROM
debian:jessie
FROM
debian:jessie
RUN
apt-get update
\
# Install runtime packages
&&
apt-get
install
-y
--no-install-recommends
\
RUN
apt-get update
&&
apt-get
install
-y
gnutls-bin iptables libnl-route-3-200 libseccomp2 libwrap0
--no-install-recommends
&&
rm
-rf
/var/lib/apt/lists/
*
autoconf autogen ca-certificates curl gcc gnutls-bin gperf iptables
\
libdbus-1-dev libgnutls28-dev libnl-route-3-dev libpam0g-dev libreadline-dev libseccomp-dev libwrap0-dev
\
make pkg-config xz-utils
\
# NOT FOUND?
# NOT FOUND?
# libfreeradius-client-dev liblz4-dev libsystemd-daemon-dev
# libfreeradius-client-dev liblz4-dev libsystemd-daemon-dev
# Use included:
# Use included:
# libhttp-parser-dev libpcl1-dev libprotobuf-c0-dev libtalloc-dev
# libhttp-parser-dev libpcl1-dev libprotobuf-c0-dev libtalloc-dev
&& rm -r /var/lib/apt/lists/*
# Install LZ4
RUN
buildDeps
=
"
\
RUN
set
-x
\
autoconf
\
autogen
\
ca-certificates
\
curl
\
gcc
\
gperf
\
libgnutls28-dev
\
libnl-route-3-dev
\
libpam0g-dev
\
libreadline-dev
\
libseccomp-dev
\
libwrap0-dev
\
make
\
pkg-config
\
xz-utils
\
"
;
\
set
-x
\
&&
apt-get update
&&
apt-get
install
-y
$buildDeps
--no-install-recommends
&&
rm
-rf
/var/lib/apt/lists/
*
\
&&
LZ4_VERSION
=
`
curl
"https://github.com/Cyan4973/lz4/releases/latest"
|
sed
-n
's/^.*tag\/\(.*\)".*/\1/p'
`
\
&&
LZ4_VERSION
=
`
curl
"https://github.com/Cyan4973/lz4/releases/latest"
|
sed
-n
's/^.*tag\/\(.*\)".*/\1/p'
`
\
&&
curl
-SL
"https://github.com/Cyan4973/lz4/archive/
$LZ4_VERSION
.tar.gz"
-o
lz4.tar.gz
\
&&
curl
-SL
"https://github.com/Cyan4973/lz4/archive/
$LZ4_VERSION
.tar.gz"
-o
lz4.tar.gz
\
&&
mkdir
-p
/usr/src/lz4
\
&&
mkdir
-p
/usr/src/lz4
\
...
@@ -21,10 +35,6 @@ RUN set -x \
...
@@ -21,10 +35,6 @@ RUN set -x \
&&
cd
/usr/src/lz4
\
&&
cd
/usr/src/lz4
\
&&
make
-j
"
$(
nproc
)
"
\
&&
make
-j
"
$(
nproc
)
"
\
&&
make
install
\
&&
make
install
\
&&
make clean
# Install OpenConnect Server
RUN
set
-x
\
&&
OC_VERSION
=
`
curl
"http://www.infradead.org/ocserv/download.html"
|
sed
-n
's/^.*version is <b>\(.*$\)/\1/p'
`
\
&&
OC_VERSION
=
`
curl
"http://www.infradead.org/ocserv/download.html"
|
sed
-n
's/^.*version is <b>\(.*$\)/\1/p'
`
\
&&
curl
-SL
"ftp://ftp.infradead.org/pub/ocserv/ocserv-
$OC_VERSION
.tar.xz"
-o
ocserv.tar.xz
\
&&
curl
-SL
"ftp://ftp.infradead.org/pub/ocserv/ocserv-
$OC_VERSION
.tar.xz"
-o
ocserv.tar.xz
\
&&
curl
-SL
"ftp://ftp.infradead.org/pub/ocserv/ocserv-
$OC_VERSION
.tar.xz.sig"
-o
ocserv.tar.xz.sig
\
&&
curl
-SL
"ftp://ftp.infradead.org/pub/ocserv/ocserv-
$OC_VERSION
.tar.xz.sig"
-o
ocserv.tar.xz.sig
\
...
@@ -37,13 +47,16 @@ RUN set -x \
...
@@ -37,13 +47,16 @@ RUN set -x \
&&
./configure
--enable-linux-namespaces
\
&&
./configure
--enable-linux-namespaces
\
&&
make
-j
"
$(
nproc
)
"
\
&&
make
-j
"
$(
nproc
)
"
\
&&
make
install
\
&&
make
install
\
&&
make clean
&&
mkdir
-p
/etc/ocserv
\
&&
cp
/usr/src/ocserv/doc/sample.config /etc/ocserv/ocserv.conf
\
&&
cd
/
\
&&
rm
-fr
/usr/src/lz4
\
&&
rm
-fr
/usr/src/ocserv
\
&&
apt-get purge
-y
--auto-remove
$buildDeps
# Setup config
# Setup config
COPY
route.txt /tmp/
COPY
route.txt /tmp/
RUN
set
-x
\
RUN
set
-x
\
&&
mkdir
-p
/etc/ocserv
\
&&
cp
/usr/src/ocserv/doc/sample.config /etc/ocserv/ocserv.conf
\
&&
sed
-i
's/^#\(auth.*optional.*\)/\1/'
/etc/ocserv/ocserv.conf
\
&&
sed
-i
's/^#\(auth.*optional.*\)/\1/'
/etc/ocserv/ocserv.conf
\
&&
sed
-i
's/\.\/sample\.passwd/\/etc\/ocserv\/ocpasswd/'
/etc/ocserv/ocserv.conf
\
&&
sed
-i
's/\.\/sample\.passwd/\/etc\/ocserv\/ocpasswd/'
/etc/ocserv/ocserv.conf
\
&&
sed
-i
's/\(max-same-clients = \)2/\110/'
/etc/ocserv/ocserv.conf
\
&&
sed
-i
's/\(max-same-clients = \)2/\110/'
/etc/ocserv/ocserv.conf
\
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment