查看Docker QuickStart的源代码
←
Docker QuickStart
跳转到:
导航
,
搜索
因为以下原因,你没有权限编辑本页:
您刚才请求的操作只有这个用户组中的用户才能使用:
用户
您可以查看并复制此页面的源代码:
== Reference == * https://github.com/docker/labs/blob/master/developer-tools/nodejs/porting/4_single_host_networking.md * https://stackoverflow.com/questions/14779104/how-to-allow-remote-connection-to-mysql * [https://docs.microsoft.com/zh-cn/aspnet/core/host-and-deploy/linux-nginx?view=aspnetcore-3.0 使用 Nginx 在 Linux 上托管 ASP.NET Core] * [https://docs.microsoft.com/zh-cn/sql/linux/sql-server-linux-setup?view=sql-server-ver15 Linux 上的 SQL Server 的安装指南] <br> === 批处理 === * [https://www.jianshu.com/p/3da1657f4c2b Windows 批处理脚本指南] * https://blog.csdn.net/qingtianZzzzz/article/details/88338263 <br> === PowerShell === * [https://www.pstips.net/powershell-introduction-and-install.html Powershell 介绍和安装] * [https://www.pstips.net/powershell-environment-variables.html Powershell环境变量] * [https://www.pstips.net/powershell-automatic-variables.html Powershell自动化变量] * [https://www.pstips.net/powershell-define-variable.html Powershell 定义变量] * [https://www.pstips.net/powershell-invoking-files-and-scripts.html Powershell 执行文件和脚本] * [https://www.pstips.net/powershell-create-and-start-scripts.html Powershell 编写和运行脚本] * [https://www.pstips.net/powershell-as-a-calculator.html Powershell 进行数学运算] * [https://www.pstips.net/powershell-executing-external-commands.html Powershell 执行外部命令] * [https://www.pstips.net/powershell-cmdlets.html Powershell 命令集 cmdlets] * [https://www.pstips.net/powershell-alias.html Powershell 别名] * Powershell 循环 [https://www.pstips.net/powershell-for-loop.html For][https://www.pstips.net/powershell-foreach-loop.html Foreach][https://www.pstips.net/powershell-do-while-loop.html Do While][https://www.pstips.net/powershell-switch-loop.html Switch] * [https://www.pstips.net/powershell-formulating-conditions.html Powershell 条件操作] * [https://www.pstips.net/powershell-finding-built-in-cmdlets.html 在PowerShell中使用Vim] * [https://www.pstips.net/powershell-sql%E4%BA%8B%E5%8A%A1.html Powershell sql事务] <br><br> === MySQL === https://hub.docker.com/_/mysql * 8.0.18, 8.0, 8, latest * 5.7.28, 5.7, 5 * 5.6.46, 5.6 https://github.com/docker-library/mysql/issues '''Env variables:''' * MYSQL_ROOT_PASSWORD * MYSQL_DATABASE * MYSQL_USER, MYSQL_PASSWORD * MYSQL_ALLOW_EMPTY_PASSWORD * MYSQL_RANDOM_ROOT_PASSWORD * MYSQL_ONETIME_PASSWORD <source lang=bash> $ docker run --name some-mysql -v /my/own/datadir:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mysql:5.6 $ docker logs some-mysql # check logs $ docker run --name some-mysql -v /my/custom:/etc/mysql/conf.d -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mysql:5.6.46 $ docker run --name some-mysql -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mysql:5.6 --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci $ docker run -it --rm mysql:5.6 --verbose --help $ docker run -v /srv/data:/var/lib/mysql --user 1000:1000 --name some-mysql -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mysql:5.6 $ docker exec some-mysql sh -c 'exec mysqldump --all-databases -uroot -p"$MYSQL_ROOT_PASSWORD"' > /some/path/on/your/host/all-databases.sql $ docker exec -i some-mysql sh -c 'exec mysql -uroot -p"$MYSQL_ROOT_PASSWORD"' < /some/path/on/your/host/all-databases.sql </source> '''docker stack deploy or docker-compose, example stack.yml for mysql:''' <pre> # Use root/example as user/password credentials version: '3.1' services: db: image: mysql command: --default-authentication-plugin=mysql_native_password restart: always environment: MYSQL_ROOT_PASSWORD: example adminer: image: adminer restart: always ports: - 8080:8080 </pre> <br><br> === InfluxDB === https://hub.docker.com/_/influxdb <source lang=bash> $ sudo docker search influxdb $ sudo docker pull influxdb:v2.0.3 </source> <br><br> === IIS === Create a Dockerfile with your website <pre> FROM mcr.microsoft.com/windows/servercore/iis RUN powershell -NoProfile -Command Remove-Item -Recurse C:\inetpub\wwwroot\* WORKDIR /inetpub/wwwroot COPY content/ . </pre> You can then build and run the Docker image: $ docker build -t iis-site . $ docker run -d -p 8000:80 --name my-running-site iis-site There is no need to specify an ENTRYPOINT in your Dockerfile since the microsoft/iis base image already includes an entrypoint application that monitors the status of the IIS World Wide Web Publishing Service (W3SVC). Verify in the browser With the current release, you can't use http://localhost to browse your site from the container host. This is because of a known behavior in WinNAT, and will be resolved in future. Until that is addressed, you need to use the IP address of the container. Once the container starts, you'll need to finds its IP address so that you can connect to your running container from a browser. You use the docker inspect command to do that: <source lang=bash> docker inspect -f "{{ .NetworkSettings.Networks.nat.IPAddress }}" my-running-site </source> You will see an output similar to this: 172.28.103.186 You can connect the running container using the IP address and configured port, http://172.28.103.186:8000 in the example shown. In addition to static content, IIS can run other workloads including but not limited to ASP.NET, ASP.NET Core, NodeJS, PHP, and Apache Tomcat. For a comprehensive tutorial on running an ASP.NET app in a container, check out the tutorial on the docs site. [https://docs.microsoft.com/zh-cn/aspnet/mvc/overview/deployment/docker-aspnetmvc 将 ASP.NET MVC 应用程序迁移到 Windows 容器] <br><br> === ASP.NET === * https://hub.docker.com/_/microsoft-dotnet-framework-aspnet <pre> Featured Tags 4.8 docker pull mcr.microsoft.com/dotnet/framework/aspnet:4.8 3.5 docker pull mcr.microsoft.com/dotnet/framework/aspnet:3.5 About This Image ASP.NET is a high productivity framework for building Web Applications using Web Forms, MVC, Web API and SignalR. This image contains: Windows Server Core as the base OS IIS 10 as Web Server .NET Framework (multiple versions available) .NET Extensibility for IIS Watch dotnet/announcements for Docker-related .NET announcements. How to use these Images The .NET Framework Docker samples show various ways to use .NET Framework and Docker together. Container sample: Run an ASP.NET application You can quickly run a container with a pre-built sample ASP.NET Docker image, based on the [ASP.NET Docker sample]. Type the following Docker command: docker run --name aspnet_sample --rm -it -p 8000:80 mcr.microsoft.com/dotnet/framework/samples:aspnetapp After the application starts, navigate to http://localhost:8000 in your web browser. You need to navigate to the application via IP address instead of localhost for earlier Windows versions, which is demonstrated in View the ASP.NET app in a running container on Windows. Related Repos .NET Framework: dotnet/framework/sdk: .NET Framework SDK dotnet/framework/runtime: .NET Framework Runtime dotnet/framework/wcf: Windows Communication Framework (WCF) dotnet/framework/samples: .NET Framework, ASP.NET and WCF Samples .NET Core: dotnet/core: .NET Core dotnet/core-nightly: .NET Core (Preview) dotnet/core/samples: .NET Core Samples </pre> <br><br> <br><br> <br><br>
返回到
Docker QuickStart
。
个人工具
登录
名字空间
页面
讨论
变换
查看
阅读
查看源代码
查看历史
操作
搜索
导航
首页
社区专页
新闻动态
最近更改
随机页面
帮助
工具箱
链入页面
相关更改
特殊页面