PHP5.5 right path for the /sources.list - php-5.5

I can't find the right path of PHP5.5 for the /sources.list, any advice?
xxxxxx#xxxx:/usr/local/src/php5-build/php-5.5.7# apt-get build-dep 5.5*
Reading package lists... Done
E: You must put some 'source' URIs in your sources.list
xxxxxx#xxxx:/usr/local/src/php5-build/php-5.5.7#

It's looks like the build not applied in the set of Debian9 and php5.5, 5.4. The installation was completed by ./configure
apt-get update
apt-get install libfcgi-dev libfcgi0ldbl libjpeg62-dbg libmcrypt-dev libssl-dev
mkdir /opt/php-5.4.45
mkdir /usr/local/src/php5
wget http://de2.php.net/get/php 5.4.45.tar.gz/from/this/mirror -O php-5.4.45.tar.gz
tar -xzvf php-5.4.45.tar.gz
cd php-5.4.45
./configure --prefix=/opt/php-5.4.45 --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --enable-mbstring --enable-sockets --enable-exif --enable-bcmath --enable-calendar --enable-zip --enable-ftp --enable-gd-native-ttf --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-freetype-dir --with-zlib --with-zlib-dir --with-bz2 --with-mcrypt --with-mhash --with-pcre-regex --with-libxml-dir=/usr --with-xmlrpc --with-xsl --with-mysql
make
make install

Related

CD command is not working inside a docker container in ubuntu box :18.04(vagrant) [duplicate]

the command :
docker build -t nginx-ubuntu .
whith the Dockerfile below :
FROM ubuntu:12.10
RUN apt-get update
RUN apt-get -y install libpcre3 libssl-dev
RUN apt-get -y install libpcre3-dev
RUN apt-get -y install wget zip gcc
RUN wget http://nginx.org/download/nginx-1.4.1.tar.gz
RUN gunzip nginx-1.4.1.tar.gz
RUN tar -xf nginx-1.4.1.tar
RUN wget --no-check-certificate https://github.com/max-l/nginx_accept_language_module/archive/master.zip
RUN unzip master
RUN cd nginx-1.4.1
RUN ./configure --add-module=../nginx_accept_language_module-master --with-http_ssl_module --with-pcre=/lib/x86_64-linux-gnu --with-openssl=/usr/lib/x86_64-linux-gnu
Fails at the last line (./configure ...)
If I remove the last line and run a bash in the container, and
execute the last line manually, it works.
I would expect that whatever command runs successfully within a container should work
when the command is appended in the Dockerfile (prefixed by RUN)
am I missing something ?
The pwd is not persistent across RUN commands. You need to cd and configure within the same RUN.
This Dockerfile works fine:
FROM ubuntu:12.10
RUN apt-get update
RUN apt-get -y install libpcre3 libssl-dev
RUN apt-get -y install libpcre3-dev
RUN apt-get -y install wget zip gcc
RUN wget http://nginx.org/download/nginx-1.4.1.tar.gz
RUN gunzip nginx-1.4.1.tar.gz
RUN tar -xf nginx-1.4.1.tar
RUN wget --no-check-certificate https://github.com/max-l/nginx_accept_language_module/archive/master.zip
RUN unzip master
RUN cd nginx-1.4.1 && ./configure --add-module=../nginx_accept_language_module-master --with-http_ssl_module --with-pcre=/lib/x86_64-linux-gnu --with-openssl=/usr/lib/x86_64-linux-gnu
As an alternative to #creak's answer, you can change the default working directory in a Dockerfile with the WORKDIR command:
FROM ubuntu:12.10
# Run update & install together so that the docker cache doesn't
# contain an out-of-date APT cache (leading to 404's when installing
# packages)
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install libpcre3 libssl-dev libpcre3-dev wget zip gcc
ADD http://nginx.org/download/nginx-1.4.1.tar.gz nginx-1.4.1.tar.gz
RUN tar -zxf nginx-1.4.1.tar.gz
RUN wget --no-check-certificate https://github.com/max-l/nginx_accept_language_module/archive/master.zip
RUN unzip master
WORKDIR nginx-1.4.1
RUN ./configure --add-module=../nginx_accept_language_module-master --with-http_ssl_module --with-pcre=/lib/x86_64-linux-gnu --with-openssl=/usr/lib/x86_64-linux-gnu
This also affects the default directory when you use docker run (overridden by the -w switch).
When I called wget or tar with RUN I needed to specify a path, it looks like ADD is the correct approach if you want to use WORKDIR as it's path instead. So either of the below resolved my issue.
RUN
RUN wget http://nginx.org/download/nginx-1.4.1.tar.gz -P ~/directory
RUN tar -zxf ~/directory/nginx-1.4.1.tar.gz -C ~/directory
or
ADD
WORKDIR ~/directory
ADD http://nginx.org/download/nginx-1.4.1.tar.gz nginx-1.4.1.tar.gz
RUN tar -zxf nginx-1.4.1.tar.gz
The second approach prevented me from needing to install wget in the container.
Another way of doing this using the \ operator to start a new line and proceed with an additional command
Example
RUN cd /Desktop \
cd Work \
pwd

Creating Docker container from Dockerfile fails on configuring bluez build

I'm trying to create a Docker container that uses Bluez. After downloading and unpacking the version that I need i use
./configure --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc --localstatedir=/var
in the directory before the make command. But every time I try to build my container using the file i get this error
checking udev directory... Package udev was not found in the pkg-config search path.
Perhaps you should add the directory containing `udev.pc'
to the PKG_CONFIG_PATH environment variable
No package 'udev' found
configure: error: udev directory is required
I'm not sure what I am doing wrong or what I can do to fix this.
The Dockerfile in question:
FROM ubuntu:18.04
USER root
WORKDIR /home/docker
COPY . /home/docker
ENV TZ=Europe/Vienna
ENV JAVA_HOME=/usr/lib/jvm/java-8-openjdk-ard64/
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt update && \
apt upgrade && \
apt install -y wget && \
apt install -y git && \
apt install -y cmake && \
apt install -y openjdk-8-jdk && \
apt install -y maven && \
apt install -y libglib2.0-dev libdbus-1-dev libudev-dev libical-dev libreadline-dev && \
wget http://www.kernel.org/pub/linux/bluetooth/bluez-5.47.tar.xz && \
tar -xf bluez-5.47.tar.xz && \
cd bluez-5.47 && \
./configure --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc --localstatedir=/var
make && \
make install

Set of artifacts that needs to be copied for Docker multistage builds with yum

I'm trying to build a multistage docker image from centos
FROM centos as python-base
RUN yum install -y wget \
tar \
make \
gcc \
gcc-c++ \
zlib \
zlib-devel \
libffi-devel \
openssl-devel \
&& yum clean all
WORKDIR /usr/src/
RUN wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz
RUN tar xzf Python-3.7.0.tgz
WORKDIR /usr/src/Python-3.7.0
RUN ./configure --enable-optimizations
RUN make altinstall
RUN python3.7 -V
#=====================================================================================
FROM centos:cs as python37
COPY --from=python-base /usr/local/lib/python3.7 /usr/local/lib/python3.7
COPY --from=python-base /usr/local/bin/pip3.7 /usr/local/bin/pip3.7
COPY --from=python-base /usr/local/bin/python3.7 /usr/local/bin/python3.7
RUN ln -s /usr/local/bin/pip3.7 /usr/local/bin/pip
RUN ln -s /usr/local/bin/python3.7 /usr/local/bin/python
As show above, I've build python37 from the python-base stage. Here, I've copied the required artifacts from python-base to python37 stage.
FROM centos as httpd-base
RUN yum -y groupinstall "Development tools"\
httpd-2.4.6-88.el7.centos.x86_64 \
&& yum clean all
So my question is, what is the set of artifacts that needs to be copied from httpd-base stage to build an image that has httpd and not all the developments tools that is required only during installation.
Any best practices in this regard is also appreciated.
Thanks in advance.

Can't install s3fs-fuse(yum fuse-devel version issue) and can't install libfuse(./config missing issue)

I am trying to get s3fs-fuse installed on my Docker container. Here is my Dockerfile so far.
FROM centos:centos6
RUN yum -y update; yum clean all; \
yum groupinstall -y "Web Server" "MySQL Database" "PHP Support"; \
service httpd start; \
chkconfig httpd on;
RUN yum install -y openssh; \
yum install -y openssh-clients;
ADD ssh/ /root/.ssh/
RUN chmod 600 /root/.ssh/*; \
touch /root/.ssh/known_hosts; \
ssh-keyscan github.com >> /root/.ssh/known_hosts;
RUN yum install -y git;
RUN yum install -y autoconf libtool gcc libstdc++-devel curl-devel mailcap; \
yum install -y automake fuse-devel gcc-c++ git libcurl-devel libxml2-devel make openssl-devel;
Then after following the instructions at https://github.com/s3fs-fuse/s3fs-fuse I perform the following commands:
git clone https://github.com/s3fs-fuse/s3fs-fuse.git
cd s3fs-fuse
./autogen.sh
./configure
Then I get this:
checking s3fs build with NSS... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for common_lib_checking... configure: error: Package requirements (fuse >= 2.8.4 libcurl >= 7.0 libxml-2.0 >= 2.6) were not met:
Requested 'fuse >= 2.8.4' but version of fuse is 2.8.3
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables common_lib_checking_CFLAGS
and common_lib_checking_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
So, I presume I need to get the right fuse version as yum fuse-devel isn't cutting it. So I go to https://github.com/libfuse/libfuse and follow the instructions there with do the following:
git clone https://github.com/libfuse/libfuse.git;
cd libfuse;
./configure
Then I get this issue:
bash: ./configure: No such file or directory
I have been all around the internet and have tried the whole autoconf and autoreconf -i thing that lead to m4 directory missing errors. I have also tried adding the --prefix=/your/chosen/directory to the ./configure --prefix=/your/chosen/directory command that lead me no where. No luck with a super sad face.
Run makeconf.sh in your libfuse clone which creates configure.

Docker command fails during build, but succeeds while executed within running container

the command :
docker build -t nginx-ubuntu .
whith the Dockerfile below :
FROM ubuntu:12.10
RUN apt-get update
RUN apt-get -y install libpcre3 libssl-dev
RUN apt-get -y install libpcre3-dev
RUN apt-get -y install wget zip gcc
RUN wget http://nginx.org/download/nginx-1.4.1.tar.gz
RUN gunzip nginx-1.4.1.tar.gz
RUN tar -xf nginx-1.4.1.tar
RUN wget --no-check-certificate https://github.com/max-l/nginx_accept_language_module/archive/master.zip
RUN unzip master
RUN cd nginx-1.4.1
RUN ./configure --add-module=../nginx_accept_language_module-master --with-http_ssl_module --with-pcre=/lib/x86_64-linux-gnu --with-openssl=/usr/lib/x86_64-linux-gnu
Fails at the last line (./configure ...)
If I remove the last line and run a bash in the container, and
execute the last line manually, it works.
I would expect that whatever command runs successfully within a container should work
when the command is appended in the Dockerfile (prefixed by RUN)
am I missing something ?
The pwd is not persistent across RUN commands. You need to cd and configure within the same RUN.
This Dockerfile works fine:
FROM ubuntu:12.10
RUN apt-get update
RUN apt-get -y install libpcre3 libssl-dev
RUN apt-get -y install libpcre3-dev
RUN apt-get -y install wget zip gcc
RUN wget http://nginx.org/download/nginx-1.4.1.tar.gz
RUN gunzip nginx-1.4.1.tar.gz
RUN tar -xf nginx-1.4.1.tar
RUN wget --no-check-certificate https://github.com/max-l/nginx_accept_language_module/archive/master.zip
RUN unzip master
RUN cd nginx-1.4.1 && ./configure --add-module=../nginx_accept_language_module-master --with-http_ssl_module --with-pcre=/lib/x86_64-linux-gnu --with-openssl=/usr/lib/x86_64-linux-gnu
As an alternative to #creak's answer, you can change the default working directory in a Dockerfile with the WORKDIR command:
FROM ubuntu:12.10
# Run update & install together so that the docker cache doesn't
# contain an out-of-date APT cache (leading to 404's when installing
# packages)
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install libpcre3 libssl-dev libpcre3-dev wget zip gcc
ADD http://nginx.org/download/nginx-1.4.1.tar.gz nginx-1.4.1.tar.gz
RUN tar -zxf nginx-1.4.1.tar.gz
RUN wget --no-check-certificate https://github.com/max-l/nginx_accept_language_module/archive/master.zip
RUN unzip master
WORKDIR nginx-1.4.1
RUN ./configure --add-module=../nginx_accept_language_module-master --with-http_ssl_module --with-pcre=/lib/x86_64-linux-gnu --with-openssl=/usr/lib/x86_64-linux-gnu
This also affects the default directory when you use docker run (overridden by the -w switch).
When I called wget or tar with RUN I needed to specify a path, it looks like ADD is the correct approach if you want to use WORKDIR as it's path instead. So either of the below resolved my issue.
RUN
RUN wget http://nginx.org/download/nginx-1.4.1.tar.gz -P ~/directory
RUN tar -zxf ~/directory/nginx-1.4.1.tar.gz -C ~/directory
or
ADD
WORKDIR ~/directory
ADD http://nginx.org/download/nginx-1.4.1.tar.gz nginx-1.4.1.tar.gz
RUN tar -zxf nginx-1.4.1.tar.gz
The second approach prevented me from needing to install wget in the container.
Another way of doing this using the \ operator to start a new line and proceed with an additional command
Example
RUN cd /Desktop \
cd Work \
pwd

Resources