浏览代码

Run update.sh

Docker Library Bot 4 年之前
父节点
当前提交
04758a0ad1
共有 1 个文件被更改,包括 114 次插入0 次删除
  1. 114 0
      dart/README.md

+ 114 - 0
dart/README.md

@@ -0,0 +1,114 @@
+<!--
+
+********************************************************************************
+
+WARNING:
+
+    DO NOT EDIT "dart/README.md"
+
+    IT IS AUTO-GENERATED
+
+    (from the other files in "dart/" combined with a set of templates)
+
+********************************************************************************
+
+-->
+
+# Quick reference
+
+-	**Maintained by**:  
+	The Dart Docker Team
+
+-	**Where to get help**:  
+	[the Docker Community Forums](https://forums.docker.com/), [the Docker Community Slack](https://dockr.ly/slack), or [Stack Overflow](https://stackoverflow.com/search?tab=newest&q=docker)
+
+# Supported tags and respective `Dockerfile` links
+
+-	[`2.12.4-sdk`, `2.12-sdk`, `2-sdk`, `stable-sdk`, `sdk`, `2.12.4`, `2.12`, `2`, `stable`, `latest`](https://github.com/dart-lang/dart-docker/blob/202eef5e34bc0b034766c9e37c5ecb44fd72f9ff/stable/buster/Dockerfile)
+-	[`2.13.0-211.14.beta-sdk`, `beta-sdk`, `2.13.0-211.14.beta`, `beta`](https://github.com/dart-lang/dart-docker/blob/202eef5e34bc0b034766c9e37c5ecb44fd72f9ff/beta/buster/Dockerfile)
+
+# Quick reference (cont.)
+
+-	**Where to file issues**:  
+	[https:/github.com/dart-lang/dart-docker/issues](https:/github.com/dart-lang/dart-docker/issues)
+
+-	**Supported architectures**: ([more info](https://github.com/docker-library/official-images#architectures-other-than-amd64))  
+	[`amd64`](https://hub.docker.com/r/amd64/dart/)
+
+-	**Published image artifact details**:  
+	[repo-info repo's `repos/dart/` directory](https://github.com/docker-library/repo-info/blob/master/repos/dart) ([history](https://github.com/docker-library/repo-info/commits/master/repos/dart))  
+	(image metadata, transfer size, etc)
+
+-	**Image updates**:  
+	[official-images repo's `library/dart` label](https://github.com/docker-library/official-images/issues?q=label%3Alibrary%2Fdart)  
+	[official-images repo's `library/dart` file](https://github.com/docker-library/official-images/blob/master/library/dart) ([history](https://github.com/docker-library/official-images/commits/master/library/dart))
+
+-	**Source of this description**:  
+	[docs repo's `dart/` directory](https://github.com/docker-library/docs/tree/master/dart) ([history](https://github.com/docker-library/docs/commits/master/dart))
+
+# What is Dart?
+
+Dart is a client-optimized language for developing fast apps on any platform. Its goal is to offer the most productive programming language for multi-platform development, paired with a flexible execution runtime platform for app frameworks. For more details, see https://dart.dev.
+
+By utilizing Dart's support for ahead-of-time (AOT) [compilation to executables](https://dart.dev/tools/dart-compile#exe), you can create very small runtime images (~10 MB).
+
+![logo](https://raw.githubusercontent.com/docker-library/docs/8fcd34b14f11b3d66e387a1490274fd9d6c1edd3/dart/logo.png)
+
+## Using this image
+
+We recommend creating small runtime images by leveraging Dart's support for ahead-of-time (AOT) [compilation to executables](https://dart.dev/tools/dart-compile#exe). This enables creating small runtime images (~10 MB).
+
+The following `Dockerfile` performs two steps:
+
+1.	Using the Dart SDK in the `dart:stable` image, compiles your server (`bin/server.dart`) to an executable (`server`).
+
+2.	Assembles the runtime image by combining the compiled server with the Dart VM runtime and it's needed dependencies located in `/runtime/`.
+
+```Dockerfile
+# Specify the Dart SDK base image version using dart:<version> (ex: dart:2.12)
+FROM dart:stable AS build
+
+# Resolve app dependencies.
+WORKDIR /app
+COPY pubspec.* .
+RUN dart pub get
+
+# Copy app source code and AOT compile it.
+COPY . .
+RUN dart compile exe bin/server.dart -o /server
+
+# Build minimal serving image from AOT-compiled `/server` and required system
+# libraries and configuration files stored in `/runtime/` from the build stage.
+FROM scratch
+COPY --from=build /runtime/ /
+COPY --from=build /server /bin/
+
+# Start server.
+EXPOSE 8080
+CMD ["/bin/server"]
+```
+
+If you have [Docker Desktop](https://www.docker.com/get-started) installed, you can build and run on your machine with the `docker` command:
+
+```shell
+$ docker build -t dart-server .
+$ docker run -it --rm -p 8080:8080 --name myserver dart-server
+```
+
+When finished, you can stop the container using the name you provided:
+
+```shell
+$ docker kill myserver
+```
+
+Maintained with ❤️ by the [Dart](https://dart.dev) team.
+
+# License
+
+View [license information](https://github.com/dart-lang/sdk/blob/master/LICENSE) for the software contained in this image.
+
+As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).
+
+Some additional license information which was able to be auto-detected might be found in [the `repo-info` repository's `dart/` directory](https://github.com/docker-library/repo-info/tree/master/repos/dart).
+
+As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.