How to write compile and make log in Dockerfile?

I put logging configure options into Dockerfile but logs file not created, why?
This is correctly working in host OS, but not working in Docker.
And to the source directory does not set permissions to the 777, but set 755.

FROM ubuntu
ENV PHP_VERSION 5.6.22
ENV PHP_PREFIX /opt/php/"$PHP_VERSION"/
...
...
ENV PHP_SRC /opt/src/php/
RUN mkdir -p "$PHP_SRC"
WORKDIR "$PHP_SRC"
...
ADD ./php-"$PHP_VERSION".tar.gz "$PHP_SRC"
RUN cd "$PHP_SRC" && \
cd "$PHP_SRC"php-"$PHP_VERSION" && \
chmod -R 777 . && \
./configure \
--prefix="$PHP_PREFIX" \
--with-config-file-path="$PHP_PREFIX"etc \
...
...
> configure.log 2>&1 && \
make -j"$(nproc)" > make.log 2>&1 && \
make install > install.log 2>&1

  • golang - weird characters using io.Copy to copy from bufio.Reader to STDOUT
  • ansible playbook: setup and connect to docker (authentication or permission failure)
  • Connecting a Docker container to a network interface / device instead of an IP address
  • Docker build image 1GB or too big
  • RubyMine connect to database
  • How to deploy multiple docker.io containers in one host?
  • How to change the bash prompt of a spawned child bash? Specifically a docker shell
  • Mac host doesn't like Docker container port forwarding
  • Unable to back up persistent storage container for docker MariaDB container
  • Go Web app on AWS with Elastic Beanstalk not showing output in logs
  • How are docker image names parsed?
  • Docker Compose with Rails hanging up on command
  • One Solution collect form web for “How to write compile and make log in Dockerfile?”

    I solved problem with change this:

    ...
    ...
    > configure.log 2>&1 && \
    make -j"$(nproc)" > make.log 2>&1 && \
    make install > install.log 2>&1
    

    …to this:

    ...
    ...
    2> configure.log && \
    make -j"$(nproc)" 2> make.log && \
    make install 2> install.log
    

    But before I set to the appropriate authority!

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.