-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
36 lines (22 loc) · 856 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM ubuntu:latest as flutter-deps
RUN apt-get update -y && apt-get upgrade -y;
RUN apt-get install -y curl git unzip xz-utils zip libglu1-mesa
ARG FLUTTER_VERSION=3.19.6
RUN git clone https://github.com/flutter/flutter.git /usr/local/flutter
RUN cd /usr/local/flutter && git fetch && git checkout $FLUTTER_VERSION
ENV PATH="/usr/local/flutter/bin:/usr/local/flutter/bin/cache/dart-sdk/bin:${PATH}"
COPY ./ui /app
WORKDIR /app
RUN flutter clean && flutter pub get
RUN flutter build web
FROM gradle:jdk19-jammy
ARG DOCKER_USERNAME=unset
ARG DOCKER_TOKEN=unset
ARG DOCKER_IMAGE=neuman314/pasteybin
COPY ./api .
COPY --from=flutter-deps /app/build/web /home/gradle/static
RUN ./gradlew clean jib -Pmultiplatform_build=true \
-PDOCKER_IMAGE=$DOCKER_IMAGE \
-PDOCKER_USERNAME=$DOCKER_USERNAME \
-PDOCKER_TOKEN=$DOCKER_TOKEN
ENTRYPOINT [ "sh" ]