Skip to content

Commit

Permalink
Default highlight.js off, dockerfile > conf highlighting, pygments (d…
Browse files Browse the repository at this point in the history
…ocker#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
  • Loading branch information
johndmulhausen authored Apr 14, 2017
1 parent 859d02b commit add2f68
Show file tree
Hide file tree
Showing 19 changed files with 136 additions and 257 deletions.
4 changes: 0 additions & 4 deletions _includes/docker_platform_matrix.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{% capture green-check %}![yes](/engine/installation/images/green-check.svg){: 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 }} |
Expand All @@ -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 }}
3 changes: 3 additions & 0 deletions _layouts/docs.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
<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 -->
Expand Down Expand Up @@ -192,10 +193,12 @@ <h1>{{ page.title }}</h1>{% endif %} {% if page.advisory %}
{% 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>
Expand Down
5 changes: 2 additions & 3 deletions _scss/_content.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
3 changes: 1 addition & 2 deletions _scss/_navigation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -172,15 +172,14 @@
margin: 0;
padding: 0 60px 0 0;
width: 300px;
line-height: 24px;
li {
padding: 2px 8px 2px 15px;
float: left;
width: 100%;
a {
display: block;
font-size: 12px;
padding: 0 10px 0 10px;
padding: 5px;
text-decoration: none;
}
}
Expand Down
22 changes: 10 additions & 12 deletions compose/aspnet-mssql-compose.md
Original file line number Diff line number Diff line change
@@ -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"
---
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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;";
Expand All @@ -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
Expand Down
67 changes: 67 additions & 0 deletions css/pygments/perldoc.css
Original file line number Diff line number Diff line change
@@ -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 */
48 changes: 16 additions & 32 deletions datacenter/dtr/2.2/guides/admin/configure/use-a-load-balancer.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)": "..."
}
```

Expand All @@ -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;
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -249,9 +239,7 @@ backend dtr_upstream_servers_443
"GroupName": "XXXXXXXXXXXX"
}
}


{% endhighlight %}
```
</div>
</div>

Expand All @@ -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
Expand All @@ -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
Expand All @@ -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>

Expand Down
6 changes: 3 additions & 3 deletions docker-for-windows/troubleshoot.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
Loading

0 comments on commit add2f68

Please sign in to comment.