Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 # google/dart-runtime | |
| 2 | |
| 3 [`google/dart-runtime`](https://index.docker.io/u/google/dart-runtime) | |
| 4 is a [docker](https://docker.io) base image that makes it easy to dockerize | |
| 5 standard [Dart](https://dartlang.org) application. | |
| 6 | |
| 7 It can automatically bundle a Python application and its dependencies with | |
|
Adam
2014/07/04 00:19:34
Bundle a `Dart` application ?
Søren Gjesse
2014/07/04 07:15:12
Thanks, changed.
| |
| 8 a single line Dockerfile. | |
| 9 | |
| 10 It is based on [`google/dart`](https://index.docker.io/u/google/dart) base | |
| 11 image. | |
| 12 | |
| 13 ## Usage | |
| 14 | |
| 15 Create a `Dockerfile` in your Dart application directory with the following | |
| 16 content: | |
| 17 | |
| 18 FROM google/dart-runtime | |
| 19 | |
| 20 To build the a docker image tagged with `my-app` run: | |
| 21 | |
| 22 docker build -t my-app . | |
| 23 | |
| 24 To run this image in a container (assuming it is a server application | |
| 25 listening in port 8080): | |
| 26 | |
| 27 docker run -d -p 8080:8080 my-app | |
| 28 | |
| 29 ## Sample | |
| 30 | |
| 31 See the [sources](/hello) for | |
| 32 [`google/dart-hello`](https://index.docker.io/u/google/dart-hello) based | |
| 33 on this image. | |
| 34 | |
| 35 ## Notes | |
| 36 | |
| 37 The image assumes that your application: | |
| 38 | |
| 39 - has a the `pubspec.yaml` and `pubspec.lock` files listing its dependencies. | |
| 40 - has a file named `bin/server.dart` as the entrypoint script. | |
| 41 - listens on port `8080` | |
| 42 | |
| 43 ### Example directory laoyout: | |
| 44 | |
| 45 bin | |
| 46 server.dart | |
| 47 packages | |
| 48 ... | |
| 49 pubspec.lock | |
| 50 pubspec.yaml | |
| 51 | |
| 52 When building your application docker image, `ONBUILD` triggers fetch the | |
| 53 dependencies listed in `pubspec.yaml` and `pubspec.yaml` and cache them | |
| 54 appropriatly. | |
| OLD | NEW |