Where my files exist in Docker image?
I’ll switch to container based infrastructure in my Travis-CI builds. So
I wrote following commands in my Dockerfile, image was successfully built:
RUN apt-get install software-properties-common -y RUN add-apt-repository ppa:ubuntu-toolchain-r/test -y RUN apt-get update RUN apt-get install gcc-4.9 -y RUN apt-get install build-essential perl python git -y RUN apt-get install "^libxcb.*" libx11-xcb-dev libglu1-mesa-dev libxrender-dev -y RUN apt-get install libedit-dev -y RUN apt-get install flex bison gperf libicu-dev libxslt-dev -y RUN git clone git://code.qt.io/qt/qt5.git qt5 RUN cd qt5 && perl init-repository RUN unset QTDIR RUN export PATH="$PWD/qtbase/bin:$PWD/qtrepotools/bin:$PATH" RUN cd qt5 && ./configure -developer-build -opensource -confirm-license -nomake examples -nomake tests RUN cd qt5 && make RUN cd qt5 && make install RUN git clone git://code.qt.io/qt-creator/qt-creator.git qt-creator RUN mkdir qt-creator-build RUN cd qt-creator-build RUN ../qt5/qtbase/bin/qmake -r ../qt-creator/qtcreator.pro RUN make -j5
Before I push it to Docker Hub I need to know where is my stuff was created in the image. I need something like map of my files for getting access from Travis-CI. Please help me to understand. Thanks
UPD: actually, I need only an absolute path of
One Solution collect form web for “Where my files exist in Docker image?”
Based on your commands, the absolute path to the
qt-creator-build folder should be
/qt-creator-build, as the root directory
/ is the default working directory for every docker command.
That said, the command
RUN make -j5 should probably be
RUN cd qt-creator-build && make -j5, but only if you actually want to run
make -j5 inside
qt-creator-build, and that’s what I understood from your code.
From the docs of Docker, you can use the
WORKDIR command to change de working directory, like: