Dont remove everything in /usr/src

This commit is contained in:
Deon George 2020-04-02 16:55:19 +11:00
parent 99dbe0d13d
commit 8f38abdaa5
2 changed files with 4 additions and 3 deletions

View File

@ -32,7 +32,7 @@ x86_64:build:
stage: build
script:
- if [ -f init ]; then chmod 500 init; fi
- ([ -z "$REFRESH" ] && docker pull ${CI_REGISTRY_IMAGE}:${CACHETAG}) || echo "true"
- ([ -z "$REFRESH" ] && docker pull ${CI_REGISTRY_IMAGE}:${CACHETAG}) || true
- docker build --cache-from ${CI_REGISTRY_IMAGE}:${CACHETAG} -t ${CI_REGISTRY_IMAGE}:${VERSION} -t ${CI_REGISTRY_IMAGE}:${CACHETAG} .
- docker push ${CI_REGISTRY_IMAGE}:${VERSION}
- docker push ${CI_REGISTRY_IMAGE}:${CACHETAG}

View File

@ -24,7 +24,7 @@ RUN mv /sbin/init /sbin/init.tmp \
&& ./configure \
&& make \
&& make install \
&& cd /usr/src/ \
&& mkdir /usr/src/ImageMagick && cd /usr/src/ImageMagick \
&& wget https://www.imagemagick.org/download/ImageMagick.tar.gz \
&& tar xf ImageMagick.tar.gz \
&& cd ImageMagick-7* \
@ -44,5 +44,6 @@ RUN mv /sbin/init /sbin/init.tmp \
tex-common mime-support poppler-data preview-latex-style readline-common libgdk-pixbuf2.0-0 libgl1-mesa-dri libgtk-3-common libpaper1 libpulse0 \
libpython2.7-minimal libpython3.7-minimal libqt5core5a libqt5gui5 libsensors-config libvdpau1 shared-mime-info libglib2.0-data libxml2-utils ttf-bitstream-vera libgvc6 \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/* /tmp/* /usr/src/* \
&& rm -rf /var/lib/apt/lists/* /tmp/* \
&& rm -rf /usr/src/libde265 /usr/src/libheif /usr/src/ImageMagick \
&& mv /sbin/init.tmp /sbin/init