--- description: components and formatting examples used in Docker's docs title: Code blocks toc_max: 3 --- # Code blocks Rouge provides lots of different code block "hints". If you leave off the hint, it tries to guess and sometimes gets it wrong. These are just a few hints that we use often. #### Raw, no highlighting The raw markup is needed to keep Liquid from interpreting the things with double braces as templating language. {% raw %} ```none none with raw $ some command with {{double braces}} $ some other command ``` {% endraw %} #### Raw, Bash {% raw %} ```bash bash with raw $ some command with {{double braces}} $ some other command ``` {% endraw %} #### Bash ```bash $ echo "deb https://packages.docker.com/1.12/apt/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list ``` #### Go ```go incoming := map[string]interface{}{ "asdf": 1, "qwer": []interface{}{}, "zxcv": []interface{}{ map[string]interface{}{}, true, int(1e9), "tyui", }, } ``` #### PowerShell ```powershell Install-Module DockerMsftProvider -Force Install-Package Docker -ProviderName DockerMsftProvider -Force [System.Environment]::SetEnvironmentVariable("DOCKER_FIPS", "1", "Machine") Expand-Archive docker-18.09.1.zip -DestinationPath $Env:ProgramFiles -Force ``` #### Python ```python return html.format(name=os.getenv('NAME', "world"), hostname=socket.gethostname(), visits=visits) ``` #### Ruby ```ruby docker_service 'default' do action [:create, :start] end ``` #### JSON ```json "server": { "http_addr": ":4443", "tls_key_file": "./fixtures/notary-server.key", "tls_cert_file": "./fixtures/notary-server.crt" } ``` #### HTML ```html