Service Configuration Option Reference

Learn about the service configuration options available in the Oracle Container Cloud Service’s Service Editor to manage your Docker environment.

You use the Service Editor to specify how to deploy the service:
  • use the Builder tab to select configuration options using checkbox and dropdown lists

  • use the Docker Run tab to enter Docker commands directly

  • use the YAML tab to enter YAML commands directly

In most cases, it doesn’t matter whether you use the Builder tab, the Docker Run tab, the YAML tab, or a combination of all three. Changes you make in one tab are reflected in the other tabs.
Builder tab Option Docker Run equivalent (click to see Docker documentation) YAML equivalent Use to:
DNS --dns=[ ] dns Specify a custom set of DNS servers for the container to use.
Labels --label=[ ] labels Specify one or more labels for use by Docker Engine.
Environment Variables -e=[ ] environment Specify the name and value of one or more environment variables.
Volumes -v=[ ] volumes Specify the desired host, mount point and container target along with its read/write options.
Volumes From --volumes-from=[ ] volumes_from Specify a comma-delimited list of container-IDs with an optional suffix for R/W mode. For example, 5d95413513ec:[ro|rw].

Mounts all the defined volumes from the referenced containers.

Expose --expose=[ ] expose Expose ports without publishing them to the host machine. The ports will only be accessible to linked services.
Ports -p=[ ] ports Publish a container᾿s port or a range of ports to the host.
Extra Hosts --add-host=[ ] extra_hosts Specify one or more additional hostname : IP mappings.
Links --link=[ ] links Link to containers in another service.

Either specify both the service name and the link alias (SERVICE:ALIAS), or just the service name (which will also be used for the alias).

Networking --network_mode network_mode Specify networking mode. Choose from the same values as the docker client --network_mode parameter (none, bridge, host).
Capabilities Add --cap-add=[ ] cap_add Specify Linux capabilities to add.
Capabilities Drop --cap-drop=[ ] cap_drop Specify Linux capabilities to drop.
Container Name --name container_name Specify a custom container name, rather than a generated default name.
CPU Shares --cpu-shares cpu_shares Specify CPU shares using integers (relative weight).
CPU Set --cpuset-cpus cpuset Specify CPUs in which to allow execution (0-3, 0,1).
Devices --device=[ ] devices Specify a device mapping.
DNS Search --dns-search=[ ] dns_search Specify the DNS search domain for the container to use.
Domain Name No equivalent domainname Specify the domain name inside the container.
Hostname --hostname hostname Specify the hostname to set for the container (not its host).
Entrypoint --entrypoint entrypoint Specify a comma-delimited list of commands to execute in order. This overrides the Run Command.
Working Dir --workdir working_dir Specify the base working directory from which any commands passed will be executed.
User --user user Specify the username or UID to use when running.
Log Driver --log-driver log_driver Specify a logging driver for the service’s containers (None, JSON file, Syslog, Journald, GELF, Fluentd).
Log Options --log-opt=[] log_opt Specify logging options for the logging driver. Logging options are key value pairs.
MAC Address --mac-address mac_address Specify a MAC address. (format:12:34:56:78:9a:bc).
Memory Limit --memory mem_limit Specify the total virtual memory space for processes inside the container.
Memory+Swap Limit --memory-swap memswap_limit Specify the total memory + swap space to provide to the container.
PID --pid pid Set the PID mode to the host PID mode.
Privileged --privileged privileged Start the container in privileged mode. Be sure to understand the security implications of this.
Read-Only --read-only read_only Mount the container's root filesystem as read-only.
STDIN Open -a stdin stdin_open Attach the container to STDIN (Standard Input).
TTY -t tty Allocate a pseudo-tty.
Restart --restart restart Specify the container restart policy on exit as one of:
  • No Do not automatically restart the container when it exits. This is the default.
  • Always Always restart the container regardless of the exit status. When you specify Always, the Docker daemon will try to restart the container indefinitely.
  • On Failure Restart only if the container exits with a non-zero exit status.
Security Options --security-opt=[ ] security_opt Specify alternative security options.