David Li commited on
Commit
7e19b5e
·
1 Parent(s): 2f35262

fix: update dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -8
Dockerfile CHANGED
@@ -3,13 +3,9 @@ WORKDIR /app
3
  COPY pubspec.yaml pubspec.lock ./
4
  RUN dart pub get
5
  COPY . .
6
- RUN dart compile exe bin/cli.dart -o dart_off_server
7
 
8
  # copy server file to basic image to run the app
9
- FROM alpine:latest
10
- WORKDIR /app
11
- RUN apk add --no-cache bash
12
- COPY --from=builder /app/dart_off_server .
13
- RUN ls -la
14
- RUN pwd
15
- ENTRYPOINT ["/app/dart_off_server"]
 
3
  COPY pubspec.yaml pubspec.lock ./
4
  RUN dart pub get
5
  COPY . .
6
+ RUN dart compile exe bin/cli.dart -o /dart/bin/dart_off_server
7
 
8
  # copy server file to basic image to run the app
9
+ FROM scratch
10
+ COPY --from=builder /dart/bin/dart_off_server /dart/bin/dart_off_server
11
+ ENTRYPOINT ["/dart/bin/dart_off_server"]