File tree 3 files changed +21
-9
lines changed
docs/src/content/docs/downloads
3 files changed +21
-9
lines changed Original file line number Diff line number Diff line change 1
1
# Install Operating system and dependencies
2
- FROM ubuntu:22 .04 AS builder
2
+ FROM ubuntu:24 .04 AS builder
3
3
4
4
RUN apt-get update
5
- RUN apt-get install -y curl git wget unzip libgconf-2-4 gdb libstdc++6 libglu1-mesa fonts-droid-fallback lib32stdc++6 python3
5
+ RUN apt-get install -y curl git wget unzip gdb libstdc++6 libglu1-mesa fonts-droid-fallback python3 yq
6
6
RUN apt-get clean
7
7
8
- RUN mkdir /app/
9
- COPY . /app
10
- WORKDIR /app
8
+ RUN mkdir /flutter_app/
9
+ COPY . /flutter_app
10
+ WORKDIR /flutter_app/app
11
+
11
12
# download Flutter SDK from Flutter Github repo
12
- RUN git clone https://github.com/flutter/flutter.git -b $(cat /FLUTTER_VERSION ) /usr/local/flutter
13
+ RUN git clone https://github.com/flutter/flutter.git -b $(yq '.environment.flutter' /flutter_app/app/pubspec.yaml -r ) /usr/local/flutter
13
14
14
15
# Set flutter environment path
15
16
ENV PATH="/usr/local/flutter/bin:/usr/local/flutter/bin/cache/dart-sdk/bin:${PATH}"
17
+
16
18
# Run flutter doctor
17
19
RUN flutter doctor
18
20
@@ -21,8 +23,10 @@ RUN flutter config --enable-web
21
23
# Copy files to container and build
22
24
RUN flutter build web
23
25
26
+ # Nginx Container
24
27
FROM nginx:alpine
25
28
26
- RUN mkdir /app/
29
+ EXPOSE 80
30
+
27
31
# Copy build/web in container to /app/
28
- COPY --from=builder . /build/web /usr/share/nginx/html
32
+ COPY --from=builder /flutter_app/app /build/web /usr/share/nginx/html
Original file line number Diff line number Diff line change
1
+ services :
2
+ butterfly :
3
+ build :
4
+ context : .
5
+ container_name : butterfly
6
+ # ports:
7
+ # - "3000:80"
8
+ restart : always
Original file line number Diff line number Diff line change @@ -22,4 +22,4 @@ All the files are in the `app/build/web` directory.
22
22
## Docker
23
23
24
24
Clone the repository and build the ` Dockerfile ` using: ` docker build -t linwood-butterfly ` .
25
- Start the server using: ` docker run -p 8080:8080 -d linwood-butterfly ` .
25
+ Start the server using: ` docker run -p 8080:80 -d linwood-butterfly ` .
You can’t perform that action at this time.
0 commit comments