-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
42 lines (31 loc) · 983 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
37
38
39
40
41
42
# Install Operating system and dependencies
FROM ubuntu:22.04
RUN apt-get update
RUN apt-get install -y curl git wget unzip libgconf-2-4 gdb libstdc++6 libglu1-mesa fonts-droid-fallback lib32stdc++6 python3
RUN apt-get clean
# Install Python and pip
RUN apt-get install -y python3 python3-pip
# Install Selenium and other dependencies
RUN pip3 install selenium
#Copy files to container and build
RUN mkdir /app/
COPY . /app/
WORKDIR /app/
# Clone Flutter
RUN git clone https://github.com/flutter/flutter.git /usr/local/flutter
# Set flutter environment path
ENV PATH="/usr/local/flutter/bin:/usr/local/flutter/bin/cache/dart-sdk/bin:${PATH}"
# Run flutter doctor
RUN flutter doctor
# Flutter upgrade
RUN flutter clean
RUN flutter config --enable-web
RUN flutter create .
# building Flutter
RUN flutter pub get
RUN flutter build web
# Record the exposed port
EXPOSE 8080
# change to build dir and run server
RUN cd build/web
CMD ["python3", "-m", "http.server", "8080"]