Skip to content

Commit

Permalink
Decrease size and debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
ahugla committed Mar 5, 2020
1 parent d085cdf commit ab6a85c
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 39 deletions.
12 changes: 7 additions & 5 deletions asset/Deployment/Docker/tito-fe/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,19 @@
FROM php:7.3.6-apache-stretch

COPY apache2-foreground /usr/local/bin/apache2-foreground
COPY installTracing.sh /tmp/installTracing.sh


RUN chmod +x /usr/local/bin/apache2-foreground; \
apt-get update; \
# for troubleshooting, can add vim and iputils-ping the following command line
apt-get install -y libmcrypt-dev git curl vim nano; \
apt-get install -y libmcrypt-dev git curl; \
docker-php-ext-install mysqli pdo_mysql sockets; \
echo "ServerName localhost" > /etc/apache2/conf-available/servername.conf; a2enconf servername; \
apt-get clean && rm -rf /var/cache/apt/archives; \
cd /tmp; \
curl -O https://raw.githubusercontent.com/ahugla/test-bidouille-docker/master/Debian9/installTracing.sh; \
chmod 755 installTracing.sh; \
./installTracing.sh;
chmod 755 /tmp/installTracing.sh; \
/tmp/installTracing.sh; \
rm -rf /tmp/*;


ENTRYPOINT ["/usr/local/bin/apache2-foreground"]
5 changes: 4 additions & 1 deletion asset/Deployment/Docker/tito-fe/apache2-foreground
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ cat >>/etc/apache2/apache2.conf <<EOF
EOF

# Allow execution of python script for tracing to wavefront
chmod 755 /var/www/html/sendTraces.py
if [ -e /var/www/html/sendTraces.py ]
then
chmod 755 /var/www/html/sendTraces.py
fi

# Make sure the config file has the updated password:
if [ -n "$MYSQL_ROOT_PASSWORD" ]; then
Expand Down
45 changes: 12 additions & 33 deletions asset/Deployment/Docker/tito-fe/installTracing.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,47 +2,26 @@
# Install: Python 3.6, pip and SDK for wavefront tracing
#
# Alexandre hugla
# 4 mars 2019
# 5 mars 2019
#
# -----------------------------------------------------------


# INSTALL PYTHON (TRES LONG)
#---------------
cd /tmp
# INSTALL PYTHON3
#----------------
echo "deb http://ftp.de.debian.org/debian testing main" >> /etc/apt/sources.list
echo 'APT::Default-Release "stable";' | tee -a /etc/apt/apt.conf.d/00local
apt-get update
apt-get -t testing install -y python3

apt-get update && sudo apt-get upgrade

apt-get install -y do build-essential libssl-dev zlib1g-dev
apt-get install -y libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm
apt-get install -y libncurses5-dev libncursesw5-dev xz-utils tk-dev

curl -O https://www.python.org/ftp/python/3.6.4/Python-3.6.4.tgz

tar xvf Python-3.6.4.tgz

#prepare the build
cd Python-3.6.4
#./configure --enable-optimizations # LENT: The configure option --enable-optimizations enables running test suites to generate data for profiling Python. The resulting python binary has better performance in executing python code.
./configure # PLUS RAPIDE


#build Python
make -j8 # dure 30 min avec --enable-optimizations

#install Python
make altinstall

python3.6 -V



# INSTALL PYTHON-PIP
#-------------------
# INSTALL PYTHON3-PIP
#----------------------
rm -f /etc/apt/apt.conf.d/00local
apt-get update
apt-get install -y python3-pip
pip3 --version


# INSTALL WAVEFRONT SDK
#----------------------
pip3 install wavefront-opentracing-sdk-python --no-cache-dir
pip3 install wavefront-opentracing-sdk-python --no-cache-dir

0 comments on commit ab6a85c

Please sign in to comment.