# dockerfile写法事例
# 下载解压Dart SDK
RUN ["/bin/bash", "-c", "wget -O /opt/data0/soft/dart-2.1.1.zip https://storage.flutter-io.cn/dart-archive/channels/stable/release/2.1.1/sdk/dartsdk-linux-x64-release.zip"]
RUN ["/bin/bash", "-c", "cd /opt/data0/soft && unzip dart-2.1.1.zip"]
# 定义系统环境变量
ENV DART_HOME /opt/data0/soft/dart-2.1.1
ENV PATH $PATH:$DART_HOME/bin
# dockerfile写法事例
RUN mkdir -p /opt/project/dart_server_project
RUN git clone [email protected]:xxx/server/xxx.git -b develop /opt/project/dart_server_project
# dockerfile写法事例
RUN cd /opt/project/dart_server_project && dart pub get
RUN dart compile exe /opt/project/dart_server_project/bin/server.dart -o /opt/project/dart_server_project/server
# dockerfile写法事例
./opt/project/dart_server_project/server