Combine RUN statements into one and remove shell expansion

This commit is contained in:
James Rowe 2020-04-30 22:39:10 -06:00
parent affcece6a6
commit 48dc64253f
4 changed files with 31 additions and 33 deletions

View File

@ -1,8 +1,6 @@
FROM ubuntu:20.04 FROM ubuntu:20.04
MAINTAINER yuzu MAINTAINER yuzu
RUN useradd -m -s /bin/bash yuzu RUN useradd -m -s /bin/bash yuzu && \
RUN apt-get update && apt-get -y full-upgrade apt-get update && apt-get -y full-upgrade && \
RUN apt-get install -y git clang-format-6.0 apt-get install -y git clang-format-6.0 && \
apt-get clean autoclean && apt-get autoremove --yes && rm -rf /var/lib/apt /var/lib/dpkg /var/lib/cache /var/lib/log
# cleanup all extra information that apt may be caching to save storage space
RUN apt-get clean autoclean && apt-get autoremove --yes && rm -rf /var/lib/{apt,dpkg,cache,log}/

View File

@ -1,20 +1,19 @@
FROM ubuntu:20.04 FROM ubuntu:20.04
MAINTAINER yuzu MAINTAINER yuzu
RUN useradd -m -s /bin/bash yuzu RUN useradd -m -s /bin/bash yuzu && \
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get -y full-upgrade DEBIAN_FRONTEND=noninteractive apt-get update && apt-get -y full-upgrade && \
RUN DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \ DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
build-essential \ build-essential \
libsdl2-dev \ libsdl2-dev \
libssl-dev \ libssl-dev \
python \ python \
qtbase5-dev \ qtbase5-dev \
qtbase5-private-dev \
qtwebengine5-dev \ qtwebengine5-dev \
libqt5opengl5-dev \ libqt5opengl5-dev \
wget \ wget \
git \ git \
ccache \ ccache \
cmake \ cmake \
ninja-build ninja-build && \
apt-get clean autoclean && apt-get autoremove --yes && rm -rf /var/lib/apt /var/lib/dpkg /var/lib/cache /var/lib/log
# cleanup all extra information that apt may be caching to save storage space
RUN apt-get clean autoclean && apt-get autoremove --yes && rm -rf /var/lib/{apt,dpkg,cache,log}/

View File

@ -1,13 +1,13 @@
FROM archlinux:latest FROM archlinux:latest
MAINTAINER yuzu MAINTAINER yuzu
RUN useradd -m -s /bin/bash yuzu && mkdir -p /tmp/pkgs
# Add mingw-repo "ownstuff" is a AUR with an up to date mingw64 # Add mingw-repo "ownstuff" is a AUR with an up to date mingw64
RUN echo "[ownstuff]" >> /etc/pacman.conf \ RUN useradd -m -s /bin/bash yuzu && mkdir -p /tmp/pkgs && \
&& echo "SigLevel = Optional TrustAll" >> /etc/pacman.conf \ echo "[ownstuff]" >> /etc/pacman.conf && \
&& echo "Server = https://martchus.no-ip.biz/repo/arch/ownstuff/os/\$arch" >> /etc/pacman.conf echo "SigLevel = Optional TrustAll" >> /etc/pacman.conf && \
RUN pacman -Syu --noconfirm echo "Server = https://martchus.no-ip.biz/repo/arch/ownstuff/os/\$arch" >> /etc/pacman.conf && \
RUN pacman -Syu --noconfirm pacman -Syu --noconfirm && \
RUN pacman -S --needed --noconfirm --noprogressbar \ pacman -Syu --noconfirm && \
pacman -S --needed --noconfirm --noprogressbar \
base-devel \ base-devel \
gnupg \ gnupg \
wget \ wget \
@ -28,16 +28,14 @@ RUN pacman -S --needed --noconfirm --noprogressbar \
mingw-w64-qt5-winextras \ mingw-w64-qt5-winextras \
python2 \ python2 \
mingw-w64-opus \ mingw-w64-opus \
mingw-w64-winpthreads mingw-w64-winpthreads && \
pacman -Scc --noconfirm && \
rm -rf /usr/share/man/ /tmp/ /var/tmp/
COPY mingw-setup.sh /tmp/pkgs COPY mingw-setup.sh /tmp/
RUN cd /tmp/pkgs && bash -e mingw-setup.sh RUN cd /tmp/ && bash -e mingw-setup.sh
# Compatibility with the old Ubuntu MingW image # Compatibility with the old Ubuntu MingW image
RUN ln -s /usr/x86_64-w64-mingw32/lib/qt /usr/x86_64-w64-mingw32/lib/qt5 RUN ln -s /usr/x86_64-w64-mingw32/lib/qt /usr/x86_64-w64-mingw32/lib/qt5
# Cleanup # Cleanup
USER root USER root
RUN pacman -Scc --noconfirm
RUN rm -rf /usr/share/man/*; \
rm -rf /tmp/*; \
rm -rf /var/tmp/*;

View File

@ -1,7 +1,10 @@
FROM alpine FROM alpine
RUN adduser -u 1000 -D -s /bin/bash yuzu MAINTAINER yuzu
RUN apk update && apk add build-base cmake python3-dev qt5-qttools-dev qt5-qtmultimedia-dev RUN adduser -u 1000 -D -s /bin/bash yuzu && \
RUN pip3 install transifex-client apk update && apk add build-base && \
cmake \
# cleanup all extra information that apt may be caching to save storage space python3-dev \
RUN apt-get clean autoclean && apt-get autoremove --yes && rm -rf /var/lib/{apt,dpkg,cache,log}/ qt5-qttools-dev \
qt5-qtmultimedia-dev && \
pip3 install transifex-client && \
apt-get clean autoclean && apt-get autoremove --yes && rm -rf /var/lib/apt /var/lib/dpkg /var/lib/cache /var/lib/log/