mirror of https://github.com/docker/docs.git
Default highlight.js off, dockerfile > conf highlighting, pygments (#2757)
* Default highlight.js off, dockerfile > conf highlighting, pygments * Address feedback, style changes, markdownify reductions * Getting rid of more markdownify * Fix for right-hand nav spacing
This commit is contained in:
parent
859d02bd66
commit
add2f680e8
|
@ -1,6 +1,5 @@
|
|||
{% capture green-check %}{: style="height: 14px"}{% endcapture %}
|
||||
|
||||
{% capture matrix %}
|
||||
| Platform | Docker EE | Docker CE x86_64 | Docker CE ARM |
|
||||
| ---------------------------------------------------------------------------------------------------- | ----------------- | ----------------- | ----------------- |
|
||||
| [Ubuntu](/engine/installation/linux/ubuntu.md) | {{ green-check }} | {{ green-check }} | {{ green-check }} |
|
||||
|
@ -16,6 +15,3 @@
|
|||
| [Microsoft Azure](/docker-for-azure/) | {{ green-check }} | {{ green-check }} | |
|
||||
| [Amazon Web Services](/docker-for-aws/) | {{ green-check }} | {{ green-check }} | |
|
||||
{: style="width: 75%" }
|
||||
|
||||
{% endcapture %}
|
||||
{{ matrix | markdownify }}
|
|
@ -63,6 +63,7 @@ else %}{% assign edit_url = "" %}{% endif %} {% break %} {% endif %} {% endfor %
|
|||
<meta name="keywords" content="{% if page.keywords %}{{ page.keywords }}{% else %}docker, docker open source, docker platform, distributed applications, microservices, containers, docker containers, docker software, docker virtualization{% endif %}">
|
||||
<link rel="stylesheet" href="/css/font-awesome.min.css">
|
||||
<link rel="stylesheet" href="/css/bootstrap.min.css">
|
||||
<link id="pygments" rel="stylesheet" href="/css/pygments/perldoc.css">
|
||||
<link id="pagestyle" rel="stylesheet" href="/css/style.css">
|
||||
|
||||
<!-- Go get "Open Sans" font from Google -->
|
||||
|
@ -192,10 +193,12 @@ else %}{% assign edit_url = "" %}{% endif %} {% break %} {% endif %} {% endfor %
|
|||
{% include footer.html %}
|
||||
</footer>
|
||||
<link rel="stylesheet" href="/css/github.css">
|
||||
{% if page.highlightjs == true %}
|
||||
<script src="/js/highlight.pack.js"></script>
|
||||
<script>
|
||||
hljs.initHighlightingOnLoad();
|
||||
</script>
|
||||
{% endif %}
|
||||
<!-- <script src="/js/anchorlinks.js"></script> -->
|
||||
<script defer src="/js/menu.js"></script>
|
||||
<script src="/js/jquery.js"></script>
|
||||
|
|
|
@ -129,10 +129,9 @@ pre {
|
|||
font-size: 13px;
|
||||
line-height: 1.42857143;
|
||||
color: #333;
|
||||
word-break: normal!important;
|
||||
word-wrap: break-word;
|
||||
word-break: normal!important;
|
||||
word-wrap: break-word;
|
||||
background-color: #f5f5f5;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
overflow-x: scroll!important;
|
||||
}
|
||||
|
|
|
@ -172,7 +172,6 @@
|
|||
margin: 0;
|
||||
padding: 0 60px 0 0;
|
||||
width: 300px;
|
||||
line-height: 24px;
|
||||
li {
|
||||
padding: 2px 8px 2px 15px;
|
||||
float: left;
|
||||
|
@ -180,7 +179,7 @@
|
|||
a {
|
||||
display: block;
|
||||
font-size: 12px;
|
||||
padding: 0 10px 0 10px;
|
||||
padding: 5px;
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
description: Create a Docker Compose application using ASP.NET Core and SQL Server on Linux in Docker.
|
||||
description: Create a Docker Compose application using ASP.NET Core and SQL Server on Linux in Docker.
|
||||
keywords: dotnet, .NET, Core, example, ASP.NET Core, SQL Server, mssql
|
||||
title: "Quickstart: Compose and ASP.NET Core with SQL Server"
|
||||
---
|
||||
|
@ -27,7 +27,7 @@ configure this app to use our SQL Server database, and then create a
|
|||
This directory will be the context of your docker-compose project. For
|
||||
[Docker for Windows](https://docs.docker.com/docker-for-windows/#/shared-drives) and
|
||||
[Docker for Mac](https://docs.docker.com/docker-for-mac/#/file-sharing), you
|
||||
have to set up file sharing for the volume that you need to map.
|
||||
have to set up file sharing for the volume that you need to map.
|
||||
|
||||
1. Within your directory, use the `aspnetcore-build` Docker image to generate a
|
||||
sample web application within the container under the `/app` directory and
|
||||
|
@ -37,12 +37,12 @@ configure this app to use our SQL Server database, and then create a
|
|||
$ docker run -v ${PWD}:/app --workdir /app microsoft/aspnetcore-build:lts dotnet new mvc --auth Individual
|
||||
```
|
||||
|
||||
> **Note**: If running in Docker for Windows, make sure to use Powershell
|
||||
> **Note**: If running in Docker for Windows, make sure to use Powershell
|
||||
or specify the absolute path of your app directory.
|
||||
|
||||
1. Create a `Dockerfile` within your app directory and add the following content:
|
||||
|
||||
```dockerfile
|
||||
```conf
|
||||
FROM microsoft/aspnetcore-build:lts
|
||||
COPY . /app
|
||||
WORKDIR /app
|
||||
|
@ -88,20 +88,18 @@ configure this app to use our SQL Server database, and then create a
|
|||
1. Create a `docker-compose.yml` file. Write the following in the file, and
|
||||
make sure to replace the password in the `SA_PASSWORD` environment variable
|
||||
under `db` below. This file will define the way the images will interact as
|
||||
independent services.
|
||||
independent services.
|
||||
|
||||
> **Note**: The SQL Server container requires a secure password to startup:
|
||||
> Minimum length 8 characters, including uppercase and lowercase letters,
|
||||
> base 10 digits and/or non-alphanumeric symbols.
|
||||
|
||||
```none
|
||||
|
||||
version: '3'
|
||||
|
||||
```yaml
|
||||
version: "3"
|
||||
services:
|
||||
web:
|
||||
build: .
|
||||
ports:
|
||||
ports:
|
||||
- "8000:80"
|
||||
depends_on:
|
||||
- db
|
||||
|
@ -126,7 +124,7 @@ configure this app to use our SQL Server database, and then create a
|
|||
[...]
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
// Database connection string.
|
||||
// Database connection string.
|
||||
// Make sure to update the Password value below from "your_password" to your actual password.
|
||||
var connection = @"Server=db;Database=master;User=sa;Password=your_password;";
|
||||
|
||||
|
@ -147,7 +145,7 @@ configure this app to use our SQL Server database, and then create a
|
|||
}
|
||||
[...]
|
||||
```
|
||||
|
||||
|
||||
1. Ready! You can now run the `docker-compose build` command.
|
||||
|
||||
```bash
|
||||
|
|
|
@ -0,0 +1,67 @@
|
|||
/*
|
||||
.highlight .hll { background-color: #ffffcc }
|
||||
.highlight { background: #eeeedd } */
|
||||
.highlight .c { color: #228B22 } /* Comment */
|
||||
.highlight .err { color: #a61717 } /* Error */
|
||||
.highlight .k { color: #8B008B } /* Keyword */
|
||||
.highlight .ch { color: #228B22 } /* Comment.Hashbang */
|
||||
.highlight .cm { color: #228B22 } /* Comment.Multiline */
|
||||
.highlight .cp { color: #1e889b } /* Comment.Preproc */
|
||||
.highlight .cpf { color: #228B22 } /* Comment.PreprocFile */
|
||||
.highlight .c1 { color: #228B22 } /* Comment.Single */
|
||||
.highlight .cs { color: #8B008B } /* Comment.Special */
|
||||
.highlight .gd { color: #aa0000 } /* Generic.Deleted */
|
||||
.highlight .ge { font-style: italic } /* Generic.Emph */
|
||||
.highlight .gr { color: #aa0000 } /* Generic.Error */
|
||||
.highlight .gh { color: #000080 } /* Generic.Heading */
|
||||
.highlight .gi { color: #00aa00 } /* Generic.Inserted */
|
||||
.highlight .go { color: #888888 } /* Generic.Output */
|
||||
.highlight .gp { color: #555555 } /* Generic.Prompt */
|
||||
.highlight .gs {} /* Generic.Strong */
|
||||
.highlight .gu { color: #800080 } /* Generic.Subheading */
|
||||
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
|
||||
.highlight .kc { color: #8B008B } /* Keyword.Constant */
|
||||
.highlight .kd { color: #8B008B } /* Keyword.Declaration */
|
||||
.highlight .kn { color: #8B008B } /* Keyword.Namespace */
|
||||
.highlight .kp { color: #8B008B } /* Keyword.Pseudo */
|
||||
.highlight .kr { color: #8B008B } /* Keyword.Reserved */
|
||||
.highlight .kt { color: #00688B } /* Keyword.Type */
|
||||
.highlight .m { color: #B452CD } /* Literal.Number */
|
||||
.highlight .s { color: #CD5555 } /* Literal.String */
|
||||
.highlight .na { color: #658b00 } /* Name.Attribute */
|
||||
.highlight .nb { color: #658b00 } /* Name.Builtin */
|
||||
.highlight .nc { color: #008b45 } /* Name.Class */
|
||||
.highlight .no { color: #00688B } /* Name.Constant */
|
||||
.highlight .nd { color: #707a7c } /* Name.Decorator */
|
||||
.highlight .ne { color: #008b45 } /* Name.Exception */
|
||||
/*.highlight .nf { color: #008b45 } Name.Function */
|
||||
.highlight .nn { color: #008b45 } /* Name.Namespace */
|
||||
.highlight .nt { color: #8B008B } /* Name.Tag */
|
||||
.highlight .nv { color: #00688B } /* Name.Variable */
|
||||
.highlight .ow { color: #8B008B } /* Operator.Word */
|
||||
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
|
||||
.highlight .mb { color: #B452CD } /* Literal.Number.Bin */
|
||||
.highlight .mf { color: #B452CD } /* Literal.Number.Float */
|
||||
.highlight .mh { color: #B452CD } /* Literal.Number.Hex */
|
||||
.highlight .mi { color: #B452CD } /* Literal.Number.Integer */
|
||||
.highlight .mo { color: #B452CD } /* Literal.Number.Oct */
|
||||
.highlight .sa { color: #CD5555 } /* Literal.String.Affix */
|
||||
.highlight .sb { color: #CD5555 } /* Literal.String.Backtick */
|
||||
.highlight .sc { color: #CD5555 } /* Literal.String.Char */
|
||||
.highlight .dl { color: #CD5555 } /* Literal.String.Delimiter */
|
||||
.highlight .sd { color: #CD5555 } /* Literal.String.Doc */
|
||||
.highlight .s2 { color: #CD5555 } /* Literal.String.Double */
|
||||
.highlight .se { color: #CD5555 } /* Literal.String.Escape */
|
||||
.highlight .sh { color: #1c7e71 } /* Literal.String.Heredoc */
|
||||
.highlight .si { color: #CD5555 } /* Literal.String.Interpol */
|
||||
.highlight .sx { color: #cb6c20 } /* Literal.String.Other */
|
||||
.highlight .sr { color: #1c7e71 } /* Literal.String.Regex */
|
||||
.highlight .s1 { color: #CD5555 } /* Literal.String.Single */
|
||||
.highlight .ss { color: #CD5555 } /* Literal.String.Symbol */
|
||||
.highlight .bp { color: #658b00 } /* Name.Builtin.Pseudo */
|
||||
.highlight .fm { color: #008b45 } /* Name.Function.Magic */
|
||||
.highlight .vc { color: #00688B } /* Name.Variable.Class */
|
||||
.highlight .vg { color: #00688B } /* Name.Variable.Global */
|
||||
.highlight .vi { color: #00688B } /* Name.Variable.Instance */
|
||||
.highlight .vm { color: #00688B } /* Name.Variable.Magic */
|
||||
.highlight .il { color: #B452CD } /* Literal.Number.Integer.Long */
|
|
@ -70,7 +70,7 @@ queried, and it takes the form:
|
|||
"replica id": "2006-01-02T15:04:05Z07:00",
|
||||
"another replica id": "2006-01-02T15:04:05Z07:00"
|
||||
},
|
||||
// other fields
|
||||
"(other fields go here)": "..."
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -94,10 +94,8 @@ Use the following examples to configure your load balancer for DTR.
|
|||
<li><a data-toggle="tab" data-target="#aws">AWS LB</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div id="nginx" class="tab-pane fade in active">
|
||||
{% highlight nginx %}
|
||||
|
||||
|
||||
<div id="nginx" class="tab-pane fade in active" markdown="1">
|
||||
```conf
|
||||
user nginx;
|
||||
worker_processes 1;
|
||||
|
||||
|
@ -129,14 +127,10 @@ stream {
|
|||
proxy_pass dtr_80;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
{% endhighlight %}
|
||||
```
|
||||
</div>
|
||||
<div id="haproxy" class="tab-pane fade">
|
||||
{% highlight none %}
|
||||
|
||||
|
||||
<div id="haproxy" class="tab-pane fade" markdown="1">
|
||||
```conf
|
||||
global
|
||||
log /dev/log local0
|
||||
log /dev/log local1 notice
|
||||
|
@ -180,14 +174,10 @@ backend dtr_upstream_servers_443
|
|||
server node01 <DTR_REPLICA_1_IP>:443 weight 100 check check-ssl verify none
|
||||
server node02 <DTR_REPLICA_2_IP>:443 weight 100 check check-ssl verify none
|
||||
server node03 <DTR_REPLICA_N_IP>:443 weight 100 check check-ssl verify none
|
||||
|
||||
|
||||
{% endhighlight %}
|
||||
```
|
||||
</div>
|
||||
<div id="aws" class="tab-pane fade">
|
||||
{% highlight json %}
|
||||
|
||||
|
||||
<div id="aws" class="tab-pane fade" markdown="1">
|
||||
```json
|
||||
{
|
||||
"Subnets": [
|
||||
"subnet-XXXXXXXX",
|
||||
|
@ -249,9 +239,7 @@ backend dtr_upstream_servers_443
|
|||
"GroupName": "XXXXXXXXXXXX"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
{% endhighlight %}
|
||||
```
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -263,9 +251,8 @@ You can deploy your load balancer using:
|
|||
<li><a data-toggle="tab" data-target="#haproxy-2" data-group="haproxy">HAProxy</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div id="nginx-2" class="tab-pane fade in active">
|
||||
{% highlight none %}
|
||||
|
||||
<div id="nginx-2" class="tab-pane fade in active" markdown="1">
|
||||
```conf
|
||||
# Create the nginx.conf file, then
|
||||
# deploy the load balancer
|
||||
|
||||
|
@ -276,12 +263,10 @@ docker run --detach \
|
|||
--publish 443:443 \
|
||||
--volume ${PWD}/nginx.conf:/etc/nginx/nginx.conf:ro \
|
||||
nginx:stable-alpine
|
||||
|
||||
{% endhighlight %}
|
||||
```
|
||||
</div>
|
||||
<div id="haproxy-2" class="tab-pane fade">
|
||||
{% highlight none %}
|
||||
|
||||
<div id="haproxy-2" class="tab-pane fade" markdown="1">
|
||||
```conf
|
||||
# Create the haproxy.cfg file, then
|
||||
# deploy the load balancer
|
||||
|
||||
|
@ -293,8 +278,7 @@ docker run --detach \
|
|||
--restart=unless-stopped \
|
||||
--volume ${PWD}/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro \
|
||||
haproxy:1.7-alpine haproxy -d -f /usr/local/etc/haproxy/haproxy.cfg
|
||||
|
||||
{% endhighlight %}
|
||||
```
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -262,11 +262,11 @@ Windows containers without Docker for Windows. However, if you install Docker
|
|||
this way, you cannot develop or run Linux containers. If you try to run a Linux
|
||||
container on the native Docker daemon, an error occurs:
|
||||
|
||||
```no-highlight
|
||||
```none
|
||||
C:\Program Files\Docker\docker.exe:
|
||||
image operating system "linux" cannot be used on this platform.
|
||||
See 'C:\Program Files\Docker\docker.exe run --help'.
|
||||
```
|
||||
```
|
||||
|
||||
### Limitations of Windows containers for `localhost` and published ports
|
||||
|
||||
|
@ -284,7 +284,7 @@ So, in a scenario where you use Docker to pull an image and run a webserver with
|
|||
a command like this:
|
||||
|
||||
```
|
||||
docker run -d -p 80:80 --name webserver nginx
|
||||
docker run -d -p 80:80 --name webserver nginx
|
||||
```
|
||||
|
||||
Using `curl http://localhost`, or pointing your web browser at
|
||||
|
|
|
@ -34,7 +34,7 @@ $ nano Dockerfile
|
|||
Although optional, it is handy to have comments at the beginning of a
|
||||
`Dockerfile` explaining its purpose:
|
||||
|
||||
```dockerfile
|
||||
```conf
|
||||
# Dockerizing MongoDB: Dockerfile for building MongoDB images
|
||||
# Based on ubuntu:latest, installs MongoDB following the instructions from:
|
||||
# http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/
|
||||
|
@ -47,7 +47,7 @@ the *parent* of your *Dockerized MongoDB* image.
|
|||
We will build our image using the latest version of Ubuntu from the
|
||||
[Docker Hub Ubuntu](https://hub.docker.com/_/ubuntu/) repository.
|
||||
|
||||
```dockerfile
|
||||
```conf
|
||||
# Format: FROM repository[:version]
|
||||
FROM ubuntu:latest
|
||||
```
|
||||
|
@ -59,7 +59,7 @@ FROM ubuntu:latest
|
|||
We will begin with importing the MongoDB public GPG key. We will also create
|
||||
a MongoDB repository file for the package manager.
|
||||
|
||||
```dockerfile
|
||||
```conf
|
||||
# Installation:
|
||||
# Import MongoDB public GPG key AND create a MongoDB list file
|
||||
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
|
||||
|
@ -69,21 +69,21 @@ RUN echo "deb http://repo.mongodb.org/apt/ubuntu $(cat /etc/lsb-release | grep D
|
|||
|
||||
After this initial preparation we can update our packages and install MongoDB.
|
||||
|
||||
```dockerfile
|
||||
```conf
|
||||
# Update apt-get sources AND install MongoDB
|
||||
RUN apt-get update && apt-get install -y mongodb-org
|
||||
```
|
||||
|
||||
> **Tip**: You can install a specific version of MongoDB by using a list of required packages with versions, e.g.:
|
||||
>
|
||||
> ```dockerfile
|
||||
> ```conf
|
||||
> RUN apt-get update && apt-get install -y mongodb-org=3.0.1 mongodb-org-server=3.0.1 mongodb-org-shell=3.0.1 mongodb-org-> mongos=3.0.1 mongodb-org-tools=3.0.1
|
||||
```
|
||||
|
||||
MongoDB requires a data directory. Let's create it as the final step of our
|
||||
installation instructions.
|
||||
|
||||
```dockerfile
|
||||
```conf
|
||||
# Create the MongoDB data directory
|
||||
RUN mkdir -p /data/db
|
||||
```
|
||||
|
@ -92,7 +92,7 @@ Lastly we set the `ENTRYPOINT` which will tell Docker to run `mongod` inside
|
|||
the containers launched from our MongoDB image. And for ports, we will use
|
||||
the `EXPOSE` instruction.
|
||||
|
||||
```dockerfile
|
||||
```conf
|
||||
# Expose port 27017 from the container to the host
|
||||
EXPOSE 27017
|
||||
|
||||
|
@ -110,7 +110,7 @@ With our `Dockerfile`, we can now build the MongoDB image using Docker. Unless
|
|||
experimenting, it is always a good practice to tag Docker images by passing the
|
||||
`--tag` option to `docker build` command.
|
||||
|
||||
```dockerfile
|
||||
```conf
|
||||
# Format: docker build --tag/-t <user-name>/<repository> .
|
||||
# Example:
|
||||
$ docker build --tag my/repo .
|
||||
|
|
|
@ -20,7 +20,7 @@ This PostgreSQL setup is for development-only purposes. Refer to the
|
|||
PostgreSQL documentation to fine-tune these settings so that it is
|
||||
suitably secure.
|
||||
|
||||
```dockerfile
|
||||
```conf
|
||||
#
|
||||
# example Dockerfile for https://docs.docker.com/examples/postgresql_service/
|
||||
#
|
||||
|
|
|
@ -12,7 +12,7 @@ using a link.
|
|||
Firstly, we create a `Dockerfile` for our new Redis
|
||||
image.
|
||||
|
||||
```dockerfile
|
||||
```conf
|
||||
FROM ubuntu:14.04
|
||||
RUN apt-get update && apt-get install -y redis-server
|
||||
EXPOSE 6379
|
||||
|
|
|
@ -338,7 +338,7 @@ If you lose the quorum of managers, you cannot administer the swarm. If you have
|
|||
lost the quorum and you attempt to perform any management operation on the swarm,
|
||||
an error occurs:
|
||||
|
||||
```no-highlight
|
||||
```none
|
||||
Error response from daemon: rpc error: code = 4 desc = context deadline exceeded
|
||||
```
|
||||
|
||||
|
|
|
@ -163,7 +163,7 @@ are included inline.
|
|||
must be escaped. If your string contains inner quote characters (`"`), escape
|
||||
them as well.
|
||||
|
||||
```dockerfile
|
||||
```conf
|
||||
# Set one or more individual labels
|
||||
LABEL com.example.version="0.0.1-beta"
|
||||
LABEL vendor="ACME Incorporated"
|
||||
|
|
|
@ -997,7 +997,7 @@ multi-host network, the daemon cannot clean up stale connectivity endpoints.
|
|||
Such stale endpoints may cause an error if a new container is connected
|
||||
to that network with the same name as the stale endpoint:
|
||||
|
||||
```no-highlight
|
||||
```none
|
||||
ERROR: Cannot start container bc0b19c089978f7845633027aa3435624ca3d12dd4f4f764b61eac4c0610f32e: container already connected to network multihost
|
||||
```
|
||||
|
||||
|
|
152
landing.md
152
landing.md
|
@ -1,152 +0,0 @@
|
|||
---
|
||||
description: Home page for Docker's documentation
|
||||
keywords: Docker, documentation, manual, guide, reference, api
|
||||
landing: true
|
||||
title: Docker Documentation
|
||||
notoc: true
|
||||
---
|
||||
|
||||
Docker packages your app with its dependencies, freeing you from worrying about your
|
||||
system configuration, and making your app more portable.
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
{% capture basics %}
|
||||
### Learn the basics of Docker
|
||||
|
||||
The basic tutorial introduces Docker concepts, tools, and commands. The examples show you how to build, push,
|
||||
and pull Docker images, and run them as containers. This
|
||||
tutorial stops short of teaching you how to deploy applications.
|
||||
{% endcapture %}{{ basics | markdownify }}
|
||||
</td>
|
||||
<td>
|
||||
|
||||
{% capture apps %}
|
||||
### Define and deploy applications
|
||||
|
||||
The define-and-deploy tutorial shows how to relate
|
||||
containers to each other and define them as services in an application that is ready to deploy at scale in a
|
||||
production environment. Highlights [Compose Version 3 new features](/engine/getstarted-voting-app/index.md#compose-version-3-features-and-compatibility) and swarm mode.
|
||||
{% endcapture %}{{ apps | markdownify }}
|
||||
|
||||
</td></tr>
|
||||
|
||||
<tr>
|
||||
<td>{% capture basics %}[Start the basic tutorial](/engine/getstarted/){: class="button primary-btn"}{% endcapture %}{{ basics | markdownify }}
|
||||
</td>
|
||||
<td>{% capture apps %}[Start the application tutorial](/engine/getstarted-voting-app/){: class="button primary-btn"}{% endcapture %}{{ apps | markdownify }}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
## Components
|
||||
<div class="block">
|
||||
<h3 id="components">Components</h3>
|
||||
<div class="component-container">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="component">
|
||||
<div class="component-icon">
|
||||
<a href="docker-for-mac/"> <img src="../images/icon-apple@2X.png" alt="Docker for Mac"> </a>
|
||||
</div>
|
||||
<h3 id="docker-for-mac"><a href="docker-for-mac/">Docker for Mac</a></h3>
|
||||
<p>A native application using the macOS sandbox security model which delivers all Docker tools to your Mac.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="component">
|
||||
<div class="component-icon">
|
||||
<a href="docker-for-mac/"> <img src="../images/icon-windows@2X.png" alt="Docker for Mac"> </a>
|
||||
</div>
|
||||
<h3 id="docker-for-windows"><a href="/#docker-for-windows">Docker for Windows</a></h3>
|
||||
<p>A native Windows application which delivers all Docker tools to your Windows computer.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="component">
|
||||
<div class="component-icon">
|
||||
<a href="docker-for-mac/"> <img src="../images/icon-linux@2X.png" alt="Docker for Mac"> </a>
|
||||
</div>
|
||||
<h3 id="docker-for-linux"><a href="/#docker-for-linux">Docker for Linux</a></h3>
|
||||
<p>Install Docker on a computer which already has a Linux distribution installed.</p>
|
||||
</div>
|
||||
</div>
|
||||
<!--components-full-width-->
|
||||
<div class="col-md-12">
|
||||
<!--engine-->
|
||||
<div class="component-full">
|
||||
<div class="component-full-icon">
|
||||
<img src="../images/icon-engine@2X.png" alt="Docker Engine">
|
||||
</div>
|
||||
<div class="component-full-copy">
|
||||
<h3 id="docker-engine"><a href="engine/installation/">Docker Engine</a></h3>
|
||||
<p>Create Docker images and run Docker containers. As of v1.12.0, Engine includes <a href="/#">swarm mode</a> container orchestration features.</p>
|
||||
</div>
|
||||
</div>
|
||||
<!--cloud-->
|
||||
<div class="component-full">
|
||||
<div class="component-full-icon">
|
||||
<img src="../images/icon-cloud@2X.png" alt="Docker Engine">
|
||||
</div>
|
||||
<div class="component-full-copy">
|
||||
<h3 id="docker-cloud"><a href="/#">Docker Cloud</a></h3>
|
||||
<p>A hosted service for building, testing, and deploying Docker images to your hosts.</p>
|
||||
</div>
|
||||
</div>
|
||||
<!--UCP-->
|
||||
<div class="component-full">
|
||||
<div class="component-full-icon">
|
||||
<img src="../images/icon-ucp@2X.png" alt="Docker Universal Control Plane">
|
||||
</div>
|
||||
<div class="component-full-copy">
|
||||
<h3 id="docker-cloud"><a href="datacenter/ucp/1.1/overview/">Docker Universal Control Plane</a></h3>
|
||||
<p>(UCP) Manage a cluster of on-premises Docker hosts as if they were a single machine.</p>
|
||||
</div>
|
||||
</div>
|
||||
<!--compose-->
|
||||
<div class="component-full">
|
||||
<div class="component-full-icon">
|
||||
<img src="../images/icon-compose@2X.png" alt="Docker Compose">
|
||||
</div>
|
||||
<div class="component-full-copy">
|
||||
<h3 id="docker-cloud"><a href="compose/overview/">Docker Compose</a></h3>
|
||||
<p>Define applications built using multiple containers.</p>
|
||||
</div>
|
||||
</div>
|
||||
<!--hub-->
|
||||
<div class="component-full">
|
||||
<div class="component-full-icon">
|
||||
<img src="../images/icon-hub@2X.png" alt="Docker Hub">
|
||||
</div>
|
||||
<div class="component-full-copy">
|
||||
<h3 id="docker-cloud"><a href="docker-hub/overview/">Docker Hub</a></h3>
|
||||
<p>A hosted registry service for managing and building images.</p>
|
||||
</div>
|
||||
</div>
|
||||
<!--dtr-->
|
||||
<div class="component-full">
|
||||
<div class="component-full-icon">
|
||||
<img src="../images/icon-registry@2X.png" alt="Docker Trusted Registry">
|
||||
</div>
|
||||
<div class="component-full-copy">
|
||||
<h3 id="docker-cloud"><a href="docker-trusted-registry/">Docker Trusted Registry</a></h3>
|
||||
<p>(DTR) stores and signs your images.</p>
|
||||
</div>
|
||||
</div>
|
||||
<!--machine-->
|
||||
<div class="component-full">
|
||||
<div class="component-full-icon">
|
||||
<img src="../images/icon-machine@2X.png" alt="Docker Machine">
|
||||
</div>
|
||||
<div class="component-full-copy">
|
||||
<h3 id="docker-cloud"><a href="machine/install-machine/">Docker Machine</a></h3>
|
||||
<p>Automate container provisioning on your network or in the cloud. Available for Windows, macOS, or Linux.</p>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end col-12-->
|
||||
</div>
|
||||
<!-- end component-container-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
18
learn.md
18
learn.md
|
@ -9,37 +9,27 @@ Docker workflows.
|
|||
|
||||
<table>
|
||||
<tr valign="top">
|
||||
<td width="50%">
|
||||
{% capture basics %}
|
||||
<td width="50%" markdown="1">
|
||||
## Learn the basics of Docker
|
||||
|
||||
The basic tutorial introduces Docker concepts, tools, and commands. The examples show you how to build, push,
|
||||
and pull Docker images, and run them as containers. This
|
||||
tutorial stops short of teaching you how to deploy applications.
|
||||
{% endcapture %}{{ basics | markdownify }}
|
||||
</td>
|
||||
<td width="50%">
|
||||
|
||||
{% capture apps %}
|
||||
<td width="50%" markdown="1">
|
||||
## Define and deploy applications
|
||||
|
||||
The define-and-deploy tutorial shows how to relate
|
||||
containers to each other and define them as services in an application that is ready to deploy at scale in a
|
||||
production environment. Highlights Compose Version 3 new features and swarm mode.
|
||||
{% endcapture %}{{ apps | markdownify }}
|
||||
|
||||
</td></tr>
|
||||
|
||||
<tr valign="top">
|
||||
<td width="50%">
|
||||
{% capture basics %}
|
||||
<td width="50%" markdown="1">
|
||||
[Start the basic tutorial](/engine/getstarted/){: class="button primary-btn"}
|
||||
{% endcapture %}{{ basics | markdownify }}
|
||||
</td>
|
||||
<td width="50%">
|
||||
{% capture apps %}
|
||||
<td width="50%" markdown="1">
|
||||
[Start the application tutorial](/engine/getstarted-voting-app/){: class="button primary-btn"}
|
||||
{% endcapture %}{{ apps | markdownify }}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
@ -95,7 +95,7 @@ hour. To run the test suite, do the following:
|
|||
value on the basis of your host performance. When they complete
|
||||
successfully, you see the output concludes with something like this:
|
||||
|
||||
```no-highlight
|
||||
```none
|
||||
Ran 68 tests in 79.135s
|
||||
```
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ docker logs SWARM_MANAGER_CONTAINER_ID
|
|||
When a container is successfully rescheduled, it generates a message similar to
|
||||
the following:
|
||||
|
||||
```no-highlight
|
||||
```none
|
||||
Rescheduled container 2536adb23 from node-1 to node-2 as 2362901cb213da321
|
||||
Container 2536adb23 was running, starting container 2362901cb213da321
|
||||
```
|
||||
|
@ -50,7 +50,7 @@ Container 2536adb23 was running, starting container 2362901cb213da321
|
|||
If for some reason, the new container fails to start on the new node, the log
|
||||
contains:
|
||||
|
||||
```no-highlight
|
||||
```none
|
||||
Failed to start rescheduled container 2362901cb213da321
|
||||
```
|
||||
|
||||
|
|
33
test.md
33
test.md
|
@ -160,9 +160,8 @@ This is also the case if you need to use rowspans or colspans. Try to avoid
|
|||
setting styles directly on your tables! If you set the width on a `<td>`, you
|
||||
only need to do it on the first one. If you have a `<th>`, set it there.
|
||||
|
||||
> **Note**: If you need to have **markdown** in a **HTML** table, you need to
|
||||
> capture the table and then filter it through `markdownify`. See [tabs](#tabs)
|
||||
> for an example. Here, I avoid that by using HTML throughout.
|
||||
> **Note**: If you need to have **markdown** in a **HTML** table, add
|
||||
> `markdown="1"` to the HTML for the `<td>` cells that contain the Markdown.
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
|
@ -242,31 +241,25 @@ Here are some tabs:
|
|||
|
||||
You need to adjust the `id` and `data-target` values to match your use case.
|
||||
|
||||
If you have Markdown inside the content of the `<div>`, you need to capture it, then
|
||||
print it and run it through the `markdownify` Liquid filter. Here's a demo:
|
||||
If you have Markdown inside the content of the `<div>`, just add `markdown="1"`
|
||||
as an attribute in the HTML for the `<div>` and Kramdown will render it.
|
||||
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a data-toggle="tab" data-target="#tab3">TAB 1 HEADER</a></li>
|
||||
<li><a data-toggle="tab" data-target="#tab4">TAB 2 HEADER</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div id="tab3" class="tab-pane fade in active">
|
||||
{% capture tab3-content %}
|
||||
<div id="tab3" class="tab-pane fade in active" markdown="1">
|
||||
#### A Markdown header
|
||||
|
||||
- list item 1
|
||||
- list item 2
|
||||
{% endcapture %}
|
||||
{{ tab3-content | markdownify }}
|
||||
</div>
|
||||
<div id="tab4" class="tab-pane fade">
|
||||
{% capture tab4-content %}
|
||||
<div id="tab4" class="tab-pane fade" markdown="1">
|
||||
#### Another Markdown header
|
||||
|
||||
- list item 3
|
||||
- list item 4
|
||||
{% endcapture %}
|
||||
{{ tab4-content | markdownify }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -472,7 +465,10 @@ end
|
|||
|
||||
### JSON
|
||||
|
||||
Sometimes this doesn't work right and you have to use `none`.
|
||||
Warning: Syntax highlighting breaks easily for JSON if the code you present is
|
||||
not a valid JSON document. Try running your snippet through [this
|
||||
linter](http://jsonlint.com/) to make sure it's valid, and remember: there is no
|
||||
syntax for comments in JSON!
|
||||
|
||||
```json
|
||||
"server": {
|
||||
|
@ -511,9 +507,10 @@ command=/usr/sbin/sshd -D
|
|||
|
||||
### Dockerfile
|
||||
|
||||
Yes, we have our own highlighting in Rouge!
|
||||
To enable syntax highlighting for Dockerfiles, use the `conf` lexer, for now.
|
||||
In the future, native Dockerfile support is coming to Rouge.
|
||||
|
||||
```dockerfile
|
||||
```conf
|
||||
#
|
||||
# example Dockerfile for https://docs.docker.com/examples/postgresql_service/
|
||||
#
|
||||
|
@ -548,9 +545,7 @@ CMD ["/usr/lib/postgresql/9.3/bin/postgres", "-D", "/var/lib/postgresql/9.3/main
|
|||
|
||||
### YAML
|
||||
|
||||
The `yaml` hint doesn't play nicely with Atom so we sometimes have to use `none`.
|
||||
|
||||
```none
|
||||
```yaml
|
||||
authorizedkeys:
|
||||
image: dockercloud/authorizedkeys
|
||||
deployment_strategy: every_node
|
||||
|
|
Loading…
Reference in New Issue