Add iTop dockerfile
This commit is contained in:
parent
0ee7e29dfd
commit
49ba582e56
|
@ -0,0 +1,17 @@
|
||||||
|
# Invoke with docker run -p 8000:80 <dockerimageid>
|
||||||
|
# Then use by browsing http://localhost:8000
|
||||||
|
# iTop in Docker version 2.2.0 beta
|
||||||
|
FROM ubuntu:15.04
|
||||||
|
MAINTAINER vincent.misson@hp.com
|
||||||
|
ENV DEBIAN_FRONTEND noninterative
|
||||||
|
# Install deps for Redfish mockup
|
||||||
|
RUN apt-get update
|
||||||
|
RUN apt-get -y install apache2 unzip sed
|
||||||
|
RUN apt-get -y install mysql-server
|
||||||
|
RUN apt-get -y install php5 php5-mysql php5-ldap php5-mcrypt php5-cli
|
||||||
|
EXPOSE 80
|
||||||
|
COPY iTop-2.2.0-beta-2371.zip /tmp/iTop-2.2.0-beta-2371.zip
|
||||||
|
COPY iTop-setup.sh /tmp/iTop-setup.sh
|
||||||
|
RUN chmod 755 /tmp/iTop-setup.sh
|
||||||
|
CMD /tmp/iTop-setup.sh
|
||||||
|
|
Binary file not shown.
|
@ -0,0 +1,35 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
function start_apache {
|
||||||
|
echo "Launching apache2 in foreground with /usr/sbin/apache2ctl -DFOREGROUND -k start"
|
||||||
|
/usr/sbin/apache2ctl -DFOREGROUND -k start
|
||||||
|
}
|
||||||
|
|
||||||
|
function stop_apache {
|
||||||
|
echo "Stopping apache2"
|
||||||
|
/usr/sbin/apache2ctl stop
|
||||||
|
}
|
||||||
|
|
||||||
|
# Trap to have a clean exit
|
||||||
|
trap stop_apache HUP INT QUIT KILL TERM
|
||||||
|
|
||||||
|
|
||||||
|
# Main
|
||||||
|
|
||||||
|
#Start MySQL and set root password for MySQL
|
||||||
|
echo "Start MySQL"
|
||||||
|
/etc/init.d/mysql start
|
||||||
|
echo "Configure MySQL root password"
|
||||||
|
mysqladmin -u root password password
|
||||||
|
|
||||||
|
#Configure web part
|
||||||
|
cd /var/www/html
|
||||||
|
unzip -q -o /tmp/iTop-2.2.0-beta-2371.zip
|
||||||
|
mkdir -p itop
|
||||||
|
chmod 777 -R /var/www/html/
|
||||||
|
cd itop
|
||||||
|
ln -sf .. web
|
||||||
|
cd ..
|
||||||
|
ip a
|
||||||
|
#sed -i -e 's/Listen 80/Listen 8000/' /etc/apache2/ports.conf
|
||||||
|
start_apache
|
Loading…
Reference in New Issue