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
2b7ceea5
Commit
2b7ceea5
authored
Jul 16, 2016
by
Tommy Lau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Try to use Alpine Linux as the base image
parent
44de8dcc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
31 deletions
+12
-31
Dockerfile
Dockerfile
+12
-31
No files found.
Dockerfile
View file @
2b7ceea5
FROM
debian:jessie
FROM
alpine:3.4
# Install runtime packages
# Install runtime packages
RUN
apt-get update
&&
apt-get
install
-y
gnutls-bin iptables libev4 libnl-route-3-200 libprotobuf-c1 libseccomp2 libwrap0 openssl
--no-install-recommends
&&
rm
-rf
/var/lib/apt/lists/
*
RUN
apk update
&&
apk add diffutils gawk gnutls gnutls-utils iptables libintl libnl linux-pam lz4 openssl readline
sed
# NOT FOUND?
# libfreeradius-client-dev liblz4-dev libsystemd-daemon-dev
# Use included:
# libhttp-parser-dev libpcl1-dev libtalloc-dev
RUN
buildDeps
=
"
\
RUN
buildDeps
=
"
\
autoconf
\
autogen
\
ca-certificates
\
curl
\
curl
\
g++
\
gcc
\
gcc
\
gnutls-dev
\
gperf
\
gperf
\
libev-dev
\
gpgme
\
libgnutls28-dev
\
linux-headers
\
libnl-route-3-dev
\
lz4-dev
\
libpam0g-dev
\
libprotobuf-c-dev
\
libreadline-dev
\
libseccomp-dev
\
libwrap0-dev
\
make
\
make
\
pkg-config
\
readline-dev
\
xz-utils
\
tar
\
xz
\
"
;
\
"
;
\
set
-x
\
set
-x
\
&&
apt-get update
&&
apt-get
install
-y
$buildDeps
--no-install-recommends
&&
rm
-rf
/var/lib/apt/lists/
*
\
&&
apk add
$buildDeps
\
&&
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
\
&&
mkdir
-p
/usr/src/lz4
\
&&
tar
-xf
lz4.tar.gz
-C
/usr/src/lz4
--strip-components
=
1
\
&&
rm
lz4.tar.gz
\
&&
cd
/usr/src/lz4
\
&&
make
-j
"
$(
nproc
)
"
\
&&
make
install
\
&&
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
\
...
@@ -52,9 +34,8 @@ RUN buildDeps=" \
...
@@ -52,9 +34,8 @@ RUN buildDeps=" \
&&
mkdir
-p
/etc/ocserv
\
&&
mkdir
-p
/etc/ocserv
\
&&
cp
/usr/src/ocserv/doc/sample.config /etc/ocserv/ocserv.conf
\
&&
cp
/usr/src/ocserv/doc/sample.config /etc/ocserv/ocserv.conf
\
&&
cd
/
\
&&
cd
/
\
&&
rm
-fr
/usr/src/lz4
\
&&
rm
-fr
/usr/src/ocserv
\
&&
rm
-fr
/usr/src/ocserv
\
&&
ap
t-get purge
-y
--auto-remove
$buildDeps
&&
ap
k del
$buildDeps
# Setup config
# Setup config
COPY
cn-no-route.txt /tmp/
COPY
cn-no-route.txt /tmp/
...
...
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