mirror of https://github.com/docker/docs.git
Add / update some redirects for old URLs, and move old engine examples
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
1c76a91158
commit
e4455a5f8f
|
@ -1138,25 +1138,25 @@ samples:
|
|||
section:
|
||||
- path: /samples/
|
||||
title: Samples home
|
||||
- path: /engine/examples/apt-cacher-ng/
|
||||
- path: /samples/apt-cacher-ng/
|
||||
title: apt-cacher-ng
|
||||
- path: /engine/examples/dotnetcore/
|
||||
- path: /samples/dotnetcore/
|
||||
title: ASP.NET Core application
|
||||
- path: /compose/aspnet-mssql-compose/
|
||||
title: ASP.NET Core + SQL Server on Linux
|
||||
- path: /engine/examples/couchdb_data_volumes/
|
||||
- path: /samples/couchdb_data_volumes/
|
||||
title: CouchDB
|
||||
- path: /compose/django/
|
||||
title: Django and PostgreSQL
|
||||
- path: /compose/wordpress/
|
||||
title: WordPress
|
||||
- path: /engine/examples/postgresql_service/
|
||||
- path: /samples/postgresql_service/
|
||||
title: PostgreSQL
|
||||
- path: /compose/rails/
|
||||
title: Rails and PostgreSQL
|
||||
- path: /engine/examples/running_riak_service/
|
||||
- path: /samples/running_riak_service/
|
||||
title: Riak
|
||||
- path: /engine/examples/running_ssh_service/
|
||||
- path: /samples/running_ssh_service/
|
||||
title: SSHd
|
||||
- path: /samples/#library-references
|
||||
title: Library references
|
||||
|
|
|
@ -27,7 +27,7 @@ most benefits from Docker.
|
|||
- [Docker for Java developers lab](https://github.com/docker/labs/tree/master/developer-tools/java/){: target="_blank" rel="noopener" class="_"}
|
||||
- [Port a node.js app to Docker lab](https://github.com/docker/labs/tree/master/developer-tools/nodejs/porting){: target="_blank" rel="noopener" class="_"}
|
||||
- [Ruby on Rails app on Docker lab](https://github.com/docker/labs/tree/master/developer-tools/ruby){: target="_blank" rel="noopener" class="_"}
|
||||
- [Dockerize a .Net Core application](../engine/examples/dotnetcore.md){: target="_blank" rel="noopener" class="_"}
|
||||
- [Dockerize a .Net Core application](../samples/dotnetcore.md){: target="_blank" rel="noopener" class="_"}
|
||||
- [Dockerize an ASP.NET Core application with SQL Server on Linux](../compose/aspnet-mssql-compose.md){: target="_blank" rel="noopener" class="_"} using Docker Compose
|
||||
|
||||
## Advanced development with the SDK or API
|
||||
|
|
|
@ -6,6 +6,7 @@ redirect_from:
|
|||
- /docker-for-windows/started/
|
||||
- /engine/installation/windows/
|
||||
- /installation/windows/
|
||||
- /win/
|
||||
- /windows/
|
||||
- /windows/started/
|
||||
- /winkit/
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
---
|
||||
description: Provides examples for using Docker
|
||||
keywords: dockerize, dockerizing apps, dockerizing applications, container, containers
|
||||
title: Dockerize an application
|
||||
redirect_from:
|
||||
- /en/latest/examples/
|
||||
---
|
||||
|
||||
This section contains the following:
|
||||
|
||||
* [Dockerizing PostgreSQL](postgresql_service.md)
|
||||
* [Dockerizing a CouchDB service](couchdb_data_volumes.md)
|
||||
* [Dockerizing an apt-cacher-ng service](apt-cacher-ng.md)
|
||||
* [Dockerizing an ASP.NET Core application](dotnetcore.md)
|
||||
* [Get Started](/get-started/)
|
|
@ -18,6 +18,8 @@ redirect_from:
|
|||
- /engine/getstarted/step_six/
|
||||
- /engine/getstarted/step_three/
|
||||
- /engine/getstarted/step_two/
|
||||
- /engine/quickstart/
|
||||
- /engine/tutorials/
|
||||
- /engine/tutorials/dockerimages/
|
||||
- /engine/tutorials/dockerizing/
|
||||
- /engine/tutorials/usingdocker/
|
||||
|
|
|
@ -2,11 +2,13 @@
|
|||
description: Installing and running an apt-cacher-ng service
|
||||
keywords: docker, example, package installation, networking, debian, ubuntu
|
||||
title: Dockerize an apt-cacher-ng service
|
||||
redirect_from:
|
||||
- /engine/examples/apt-cacher-ng/
|
||||
---
|
||||
|
||||
> **Note**:
|
||||
> - **If you don't like sudo** then see
|
||||
> [*Giving non-root access*](../install/linux-postinstall.md#manage-docker-as-a-non-root-user).
|
||||
> [*Giving non-root access*](../engine/install/linux-postinstall.md#manage-docker-as-a-non-root-user).
|
||||
> - **If you're using macOS or docker via TCP** then you shouldn't use sudo.
|
||||
|
||||
When you have multiple Docker servers, or build unrelated Docker
|
Before Width: | Height: | Size: 143 KiB After Width: | Height: | Size: 143 KiB |
|
@ -2,11 +2,13 @@
|
|||
description: Sharing data between 2 couchdb databases
|
||||
keywords: docker, example, package installation, networking, couchdb, data volumes
|
||||
title: Dockerize a CouchDB service
|
||||
redirect_from:
|
||||
- /engine/examples/couchdb_data_volumes/
|
||||
---
|
||||
|
||||
> **Note**
|
||||
>
|
||||
> **If you don't like sudo** then see [*Giving non-root access*](../install/linux-postinstall.md#manage-docker-as-a-non-root-user)
|
||||
> **If you don't like sudo** then see [*Giving non-root access*](../engine/install/linux-postinstall.md#manage-docker-as-a-non-root-user)
|
||||
|
||||
Here's an example of using data volumes to share the same data between
|
||||
two CouchDB containers. This could be used for hot upgrades, testing
|
|
@ -2,6 +2,8 @@
|
|||
description: Create a Docker image by layering your ASP.NET Core app on debian for Linux Containers or with Windows Nano Server containers using a Dockerfile.
|
||||
keywords: dockerize, dockerizing, dotnet, .NET, Core, article, example, platform, installation, containers, images, image, dockerfile, build, asp.net, asp.net core
|
||||
title: Dockerize an ASP.NET Core application
|
||||
redirect_from:
|
||||
- /engine/examples/dotnetcore/
|
||||
---
|
||||
|
||||
## Introduction
|
||||
|
@ -15,9 +17,8 @@ This example demonstrates how to dockerize an ASP.NET Core application.
|
|||
Linux
|
||||
- Great for modern cloud-based apps, such as web apps, IoT apps, and mobile
|
||||
backends
|
||||
- ASP.NET Core apps can run on [.NET
|
||||
Core](https://www.microsoft.com/net/core/platform) or on the full [.NET
|
||||
Framework](https://www.microsoft.com/net/framework)
|
||||
- ASP.NET Core apps can run on [.NET Core](https://www.microsoft.com/net/core/platform)
|
||||
or on the full [.NET Framework](https://www.microsoft.com/net/framework)
|
||||
- Designed to provide an optimized development framework for apps that are
|
||||
deployed to the cloud or run on-premises
|
||||
- Modular components with minimal overhead retain flexibility while
|
||||
|
@ -26,20 +27,21 @@ constructing your solutions
|
|||
## Prerequisites
|
||||
|
||||
This example assumes you already have an ASP.NET Core app
|
||||
on your machine. If you are new to ASP.NET you can follow a [simple
|
||||
tutorial](https://www.asp.net/get-started) to initialize a project or clone our [ASP.NET Docker Sample](https://github.com/dotnet/dotnet-docker/tree/master/samples/aspnetapp).
|
||||
on your machine. If you are new to ASP.NET you can follow a
|
||||
[simple tutorial](https://www.asp.net/get-started) to initialize a project or
|
||||
clone our [ASP.NET Docker Sample](https://github.com/dotnet/dotnet-docker/tree/master/samples/aspnetapp).
|
||||
|
||||
## Create a Dockerfile for an ASP.NET Core application
|
||||
|
||||
### Method 1:
|
||||
|
||||
1. Create a `Dockerfile` in your project folder.
|
||||
2. Add the text below to your `Dockerfile` for either Linux or [Windows
|
||||
Containers](https://docs.microsoft.com/virtualization/windowscontainers/about/).
|
||||
2. Add the text below to your `Dockerfile` for either Linux or
|
||||
[Windows Containers](https://docs.microsoft.com/virtualization/windowscontainers/about/).
|
||||
The tags below are multi-arch meaning they pull either Windows or
|
||||
Linux containers depending on what mode is set in
|
||||
[Docker Desktop for Windows](../../docker-for-windows/index.md). Read more on
|
||||
[switching containers](../../docker-for-windows/index.md#switch-between-windows-and-linux-containers).
|
||||
[Docker Desktop for Windows](../docker-for-windows/index.md). Read more on
|
||||
[switching containers](../docker-for-windows/index.md#switch-between-windows-and-linux-containers).
|
||||
3. The `Dockerfile` assumes that your application is called `aspnetapp`. Change
|
||||
the `Dockerfile` to use the DLL file of your project.
|
||||
|
||||
|
@ -52,7 +54,7 @@ COPY *.csproj ./
|
|||
RUN dotnet restore
|
||||
|
||||
# Copy everything else and build
|
||||
COPY . ./
|
||||
COPY ../engine/examples ./
|
||||
RUN dotnet publish -c Release -o out
|
||||
|
||||
# Build runtime image
|
||||
|
@ -73,12 +75,12 @@ obj/
|
|||
### Method 2 (build app outside Docker container):
|
||||
|
||||
1. Create a `Dockerfile` in your project folder.
|
||||
2. Add the text below to your `Dockerfile` for either Linux or [Windows
|
||||
Containers](https://docs.microsoft.com/virtualization/windowscontainers/about/).
|
||||
2. Add the text below to your `Dockerfile` for either Linux or
|
||||
[Windows Containers](https://docs.microsoft.com/virtualization/windowscontainers/about/).
|
||||
The tags below are multi-arch meaning they pull either Windows or
|
||||
Linux containers depending on what mode is set in
|
||||
[Docker Desktop for Windows](../../docker-for-windows/index.md). Read more on
|
||||
[switching containers](../../docker-for-windows/index.md#switch-between-windows-and-linux-containers).
|
||||
[Docker Desktop for Windows](../docker-for-windows/index.md). Read more on
|
||||
[switching containers](../docker-for-windows/index.md#switch-between-windows-and-linux-containers).
|
||||
3. The `Dockerfile` assumes that your application is called `aspnetapp`. Change the `Dockerfile` to use the DLL file of your project. This method assumes that your project is already built and it copies the build artifacts from the publish folder. Refer to the Microsoft documentation on [Containerize a .Net Core app](https://docs.microsoft.com/en-us/dotnet/core/docker/build-container?tabs=windows#create-the-dockerfile){: target="blank" rel="noopener" class=“"}.
|
||||
|
||||
The `docker build` step here will be much faster than method 1, as all the artifacts are built outside of the `docker build` step and the size of the base image is much smaller compared to the build base image.
|
||||
|
@ -109,7 +111,7 @@ $ docker run -d -p 8080:80 --name myapp aspnetapp
|
|||
## View the web page running from a container
|
||||
|
||||
* Go to [localhost:8080](http://localhost:8080) to access your app in a web browser.
|
||||
* If you are using the Nano [Windows Container](../../docker-for-windows/index.md)
|
||||
* If you are using the Nano [Windows Container](../docker-for-windows/index.md)
|
||||
and have not updated to the Windows Creator Update there is a bug affecting how
|
||||
[Windows 10 talks to Containers via "NAT"](https://github.com/Microsoft/Virtualization-Documentation/issues/181#issuecomment-252671828)
|
||||
(Network Address Translation). You must hit the IP of the container
|
|
@ -1,6 +1,10 @@
|
|||
---
|
||||
title: Samples
|
||||
description: Learn how to develop and ship containerized applications, by walking through samples that exhibits canonical practices.
|
||||
redirect_from:
|
||||
- /en/latest/examples/
|
||||
- /engine/examples/
|
||||
- /examples/
|
||||
---
|
||||
|
||||
{% assign labsbase = "https://github.com/docker/labs/tree/master" %}
|
||||
|
@ -30,15 +34,15 @@ Run popular software using Docker.
|
|||
|
||||
| Sample | Description |
|
||||
| ------------------------------------------------------------------------- | --------------------------------------------------------- |
|
||||
| [apt-cacher-ng](../engine/examples/apt-cacher-ng.md) | Run a Dockerized apt-cacher-ng instance. |
|
||||
| [.Net Core application](../engine/examples/dotnetcore.md) | Run a Dockerized ASP.NET Core application. |
|
||||
| [apt-cacher-ng](apt-cacher-ng.md) | Run a Dockerized apt-cacher-ng instance. |
|
||||
| [.Net Core application](dotnetcore.md) | Run a Dockerized ASP.NET Core application. |
|
||||
| [ASP.NET Core + SQL Server on Linux](../compose/aspnet-mssql-compose.md) | Run a Dockerized ASP.NET Core + SQL Server environment. |
|
||||
| [CouchDB](../engine/examples/couchdb_data_volumes.md) | Run a Dockerized CouchDB instance. |
|
||||
| [CouchDB](couchdb_data_volumes.md) | Run a Dockerized CouchDB instance. |
|
||||
| [Django + PostgreSQL](../compose/django.md) | Run a Dockerized Django + PostgreSQL environment. |
|
||||
| [PostgreSQL](../engine/examples/postgresql_service.md) | Run a Dockerized PostgreSQL instance. |
|
||||
| [PostgreSQL](postgresql_service.md) | Run a Dockerized PostgreSQL instance. |
|
||||
| [Rails + PostgreSQL](../compose/rails.md) | Run a Dockerized Rails + PostgreSQL environment. |
|
||||
| [Riak](../engine/examples/running_riak_service.md) | Run a Dockerized Riak instance. |
|
||||
| [SSHd](../engine/examples/running_ssh_service.md) | Run a Dockerized SSHd instance. |
|
||||
| [Riak](running_riak_service.md) | Run a Dockerized Riak instance. |
|
||||
| [SSHd](running_ssh_service.md) | Run a Dockerized SSHd instance. |
|
||||
| [WordPress](../compose/wordpress.md) | Quickstart: Compose and WordPress. |
|
||||
|
||||
## Library references
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
description: Running and installing a PostgreSQL service
|
||||
keywords: docker, example, package installation, postgresql
|
||||
title: Dockerize PostgreSQL
|
||||
redirect_from:
|
||||
- /engine/examples/postgresql_service/
|
||||
---
|
||||
|
||||
## Install PostgreSQL on Docker
|
||||
|
@ -80,7 +82,7 @@ $ docker run --rm -P --name pg_test eg_postgresql
|
|||
```
|
||||
|
||||
There are two ways to connect to the PostgreSQL server. We can use
|
||||
[*Link Containers*](../../network/links.md),
|
||||
[*Link Containers*](../network/links.md),
|
||||
or we can access it from our host (or the network).
|
||||
|
||||
> **Note**: The `--rm` removes the container and its image when
|
|
@ -2,6 +2,8 @@
|
|||
description: Build a Docker image with Riak pre-installed
|
||||
keywords: docker, example, package installation, networking, riak
|
||||
title: Dockerize a Riak service
|
||||
redirect_from:
|
||||
- /engine/examples/running_riak_service/
|
||||
---
|
||||
|
||||
The goal of this example is to show you how to build a Docker image with
|
|
@ -2,6 +2,8 @@
|
|||
description: Installing and running an SSHd service on Docker
|
||||
keywords: docker, example, package installation, networking
|
||||
title: Dockerize an SSH service
|
||||
redirect_from:
|
||||
- /engine/examples/running_ssh_service/
|
||||
---
|
||||
|
||||
Running sshd inside a container is discouraged, however, it might be still useful
|
Loading…
Reference in New Issue