Speed up docker builds, create a special image for build dependencies.
This commit is contained in:
parent
c4f68d53ca
commit
b9c1e1f53a
3 changed files with 18 additions and 9 deletions
10
Dockerfile
10
Dockerfile
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
10
docker_images/builddeps/Dockerfile
Normal file
10
docker_images/builddeps/Dockerfile
Normal 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
|
Loading…
Reference in a new issue