Spaces:
Build error
Build error
David Li commited on
Commit ·
ba14da6
1
Parent(s): b5127e7
fix: update docker file
Browse files- Dockerfile +10 -3
- pubspec.yaml +1 -1
Dockerfile
CHANGED
|
@@ -1,7 +1,14 @@
|
|
| 1 |
-
FROM dart:2.19.1
|
|
|
|
| 2 |
COPY pubspec.yaml pubspec.lock ./
|
| 3 |
RUN dart pub get
|
| 4 |
COPY . .
|
| 5 |
-
RUN dart compile exe bin/cli.dart
|
| 6 |
RUN chmod 777 server
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM dart:2.19.1 as builder
|
| 2 |
+
WORKDIR /app
|
| 3 |
COPY pubspec.yaml pubspec.lock ./
|
| 4 |
RUN dart pub get
|
| 5 |
COPY . .
|
| 6 |
+
RUN dart compile exe bin/cli.dart
|
| 7 |
RUN chmod 777 server
|
| 8 |
+
|
| 9 |
+
# copy server file to basic image to run the app
|
| 10 |
+
FROM ubuntu:18.04
|
| 11 |
+
WORKDIR /app
|
| 12 |
+
COPY --from=builder /app/server .
|
| 13 |
+
|
| 14 |
+
CMD [ "./server" ]
|
pubspec.yaml
CHANGED
|
@@ -7,7 +7,7 @@ environment:
|
|
| 7 |
sdk: '>=2.17.5 <3.0.0'
|
| 8 |
|
| 9 |
dependencies:
|
| 10 |
-
alfred:
|
| 11 |
|
| 12 |
dev_dependencies:
|
| 13 |
lints: ^2.0.0
|
|
|
|
| 7 |
sdk: '>=2.17.5 <3.0.0'
|
| 8 |
|
| 9 |
dependencies:
|
| 10 |
+
alfred: ^1.0.0+1
|
| 11 |
|
| 12 |
dev_dependencies:
|
| 13 |
lints: ^2.0.0
|