Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
code
pfabric
Commits
f4f11fae
Commit
f4f11fae
authored
Aug 13, 2019
by
Philipp Götze
Browse files
🐳
Updated Dockerfile with alpine base image
parent
a5edd4f4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Dockerfile
View file @
f4f11fae
# Based on cxxdev by Dan Liew <daniel.liew@imperial.ac.uk>
FROM
ubuntu:14.04
FROM
alpine:latest
MAINTAINER
Kai-Uwe Sattler <kus@tu-ilmenau.de>
ENV
CONTAINER_USER="pf"
RUN
apt-get update
&&
apt-get
-y
upgrade
&&
apt-get
-y
install
wget
RUN
apt-get
-y
--no-install-recommends
install
\
aptitude
\
software-properties-common
\
python-software-properties
\
bash-completion
\
build-essential
\
coreutils
\
git-core
\
htop
\
mercurial
\
ncdu
\
ninja-build
\
python
\
python-dev
\
python-pip
\
subversion
\
tmux
\
tree
\
unzip
\
vim
RUN
add-apt-repository ppa:ubuntu-toolchain-r/test
RUN
apt-get update
RUN
apt-get
-y
install
gcc-5 g++-5
RUN
update-alternatives
--install
/usr/bin/gcc gcc /usr/bin/gcc-5 1
--slave
/usr/bin/g++ g++ /usr/bin/g++-5
# Download and install ZeroMQ
RUN
wget https://github.com/zeromq/zeromq4-1/releases/download/v4.1.5/zeromq-4.1.5.tar.gz
;
\
tar
xvzof zeromq-4.1.5.tar.gz
&&
rm
zeromq-4.1.5.tar.gz
RUN
cd
zeromq-4.1.5
&&
./configure
&&
make
install
RUN
wget https://raw.githubusercontent.com/zeromq/cppzmq/master/zmq.hpp
&&
mv
zmq.hpp /usr/local/include
# Download and install a more recent version of CMake
RUN
wget https://cmake.org/files/v3.6/cmake-3.6.2.tar.gz
;
\
tar
xvzof cmake-3.6.2.tar.gz
&&
rm
cmake-3.6.2.tar.gz
RUN
cd
cmake-3.6.2
&&
./configure
&&
make
&&
make
install
# Download and install the most recent version of the Boost libraries
RUN
wget https://sourceforge.net/projects/boost/files/boost/1.63.0/boost_1_63_0.tar.gz
;
\
tar
xvzof boost_1_63_0.tar.gz
;
\
rm
boost_1_63_0.tar.gz
;
RUN
cd
boost_1_63_0
&&
./bootstrap.sh
--prefix
=
/usr/local/boost
&&
mkdir
/usr/local/boost
&&
./b2
install
# Cleanup
RUN
rm
-fr
/boost_1_63_0 zeromq-4.1.5 cmake-3.6.2
# Add non-root user for container but give it sudo access.
# Password is the same as the username
RUN
useradd
-m
${
CONTAINER_USER
}
&&
\
echo
${
CONTAINER_USER
}
:
${
CONTAINER_USER
}
| chpasswd
&&
\
cp
/etc/sudoers /etc/sudoers.bak
&&
\
echo
"
${
CONTAINER_USER
}
ALL=(root) ALL"
>>
/etc/sudoers
# Make bash the default shell (useful for when using tmux in the container)
RUN
chsh
--shell
/bin/bash
${
CONTAINER_USER
}
USER
${CONTAINER_USER}
# Download an build PipeFabric
RUN
cd
/home/
${
CONTAINER_USER
}
&&
\
git clone http://dbgit.prakinf.tu-ilmenau.de/code/pfabric.git
&&
\
cd
pfabric
&&
mkdir
build
&&
cd
build
&&
\
export
BOOST_ROOT
=
/usr/local/boost
;
\
cmake ../src
# RUN cd /home/${CONTAINER_USER}/pfabric/build && make VERBOSE=1 && make test
# Installing dependencies
RUN
apk update
&&
apk add
--no-cache
\
cmake
\
git
\
g++
\
boost-dev
\
zeromq-dev
\
make
\
sudo
&&
\
wget
-P
/usr/include/ https://raw.githubusercontent.com/zeromq/cppzmq/master/zmq.hpp
&&
\
# Cleaning up
rm -rf /usr/share/doc && \
rm -rf /usr/share/man/?? && \
rm -rf /usr/share/man/??_*
# Add user and allow sudo
ENV
USER pf
ENV
USERPASS pfpass
RUN
adduser
-S
$USER
&&
\
echo
"
$USER
:
$USERPASS
"
| chpasswd
&&
\
echo
"
${
USER
}
ALL=(root) ALL"
>>
/etc/sudoers
USER
$USER
WORKDIR
/home/$USER
# Download and build PipeFabric
RUN
git config
--global
http.sslverify
false
&&
\
git clone https://dbgit.prakinf.tu-ilmenau.de/code/pfabric.git
# This costs too much space for the image
# cd pfabric && mkdir build && cd build && \
# cmake ../src && \
# make VERBOSE=1 && make test
Write
Preview
Supports
Markdown
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