Speed up docker builds, create a special image for build dependencies.

This commit is contained in:
zontreck 2024-05-25 05:52:56 -07:00
parent c4f68d53ca
commit b9c1e1f53a
3 changed files with 18 additions and 9 deletions

View file

@ -1,16 +1,8 @@
FROM debian:latest AS BUILDER
FROM git.zontreck.com/ariascreations/conanservermanager:builddeps AS BUILDER
# Obtain the Flutter SDK
WORKDIR /app
COPY . .
WORKDIR /
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install -y git wget curl unzip xz-utils zip libglu1-mesa clang cmake ninja-build pkg-config liblzma-dev libstdc++-12-dev rsync
RUN wget -O flutter.tar.xz https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.22.1-stable.tar.xz
RUN tar -xvf flutter.tar.xz
WORKDIR /app
RUN rm RELEASE
RUN PATH=$PATH:/flutter/bin /bin/bash /app/compile.sh

View file

@ -13,6 +13,13 @@ if [ -f RELEASE ]
then
docker login git.zontreck.com
if [ -f RELEASE.DEPS ]
then
docker build -t git.zontreck.com/ariascreations/conanservermanager:builddeps docker_images/builddeps
docker push git.zontreck.com/ariascreations/conanservermanager:builddeps
rm RELEASE.DEPS
fi
docker build -t git.zontreck.com/ariascreations/conanservermanager:stable $(pwd)
docker push git.zontreck.com/ariascreations/conanservermanager:stable

View file

@ -0,0 +1,10 @@
FROM debian:latest
WORKDIR /
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install -y git wget curl unzip xz-utils zip libglu1-mesa clang cmake ninja-build pkg-config liblzma-dev libstdc++-12-dev rsync
RUN wget -O flutter.tar.xz https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.22.1-stable.tar.xz
RUN tar -xvf flutter.tar.xz