github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/website/content/plugins/drivers/community/pot.mdx (about) 1 --- 2 layout: docs 3 page_title: 'Drivers: pot' 4 description: >- 5 The Pot task driver is used to run pot (https://github.com/pizzamig/pot) 6 containers using FreeBSD jails. 7 --- 8 9 # Pot Task Driver 10 11 Name: `pot` 12 13 The Pot task driver provides an interface for using [pot][pot-github-repo] for dynamically running applications inside a FreeBSD Jail. 14 You can download the external nomad-pot-driver [here][nomad-pot-driver]. 15 16 ## Task Configuration 17 18 ```hcl 19 task "nginx-pot" { 20 driver = "pot" 21 22 config { 23 image = "https://pot-registry.zapto.org/registry/" 24 pot = "FBSD120-nginx" 25 tag = "1.0" 26 command = "nginx" 27 args = [ 28 "-g 'daemon off;'" 29 ] 30 network_mode = "public-bridge" 31 port_map = { 32 http = "80" 33 } 34 copy = [ 35 "/root/index.html:/usr/local/www/nginx-dist/index.html", 36 "/root/nginx.conf:/usr/local/etc/nginx/nginx.conf" 37 ] 38 mount = [ 39 "/tmp/test:/root/test", 40 ] 41 mount_read_only = [ 42 "/tmp/test2:/root/test2" 43 ] 44 extra_hosts = [ 45 "artifactory.yourdomain.com:192.168.0.1", 46 "mail.yourdomain.com:192.168.0.2" 47 ] 48 } 49 } 50 ``` 51 52 The pot task driver supports the following parameters: 53 54 - `image` - The url for the http registry from where to get the image. 55 56 - `pot` - Name of the image in the registry. 57 58 - `tag` - Version of the image. 59 60 - `command` - Command that is going to be executed once the jail is started. 61 62 - `args` - (Optional) List of options for the command executed on the command argument. 63 64 - `network_mode` - (Optional) Defines the network mode of the pot. Default: **"public-bridge"** 65 66 Possible values are: 67 68 **"public-bridge"** pot creates an internal virtual network with a NAT table where all traffic is going to be sent. 69 70 **"host"** pot bounds the jail directly to a host port. 71 72 - `port_map` - (Optional) Sets the port on which the application is listening inside of the jail. If not set, the application will inherit the port configuration from the image. 73 74 - `copy` - (Optional) Copies a file from the host machine to the pot jail in the given directory. 75 76 - `mount` - (Optional) Mounts a read/write folder from the host machine to the pot jail. 77 78 - `mount_read_only` - (Optional) Mounts a read only directory inside the pot jail. 79 80 - `extra_hosts` - (Optional) A list of hosts, given as host:IP, to be added to /etc/hosts 81 82 ## Client Requirements 83 84 `pot Task Driver` requires the following: 85 86 - 64-bit FreeBSD 12.0-RELEASE host . 87 - The FreeBSD's Nomad binary (available as a package). 88 - The pot-task-driver binary placed in the [plugin_dir][plugin_dir] directory. 89 - Installing [pot][pot-github-repo] and following the install [guide][pot-install-guide]. 90 - Webserver from where to serve the images. (simple file server) 91 - Following lines need to be included in your rc.conf 92 93 ``` 94 nomad_user="root" 95 nomad_env="PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/sbin:/bin" 96 ``` 97 98 [nomad-pot-driver]: https://github.com/trivago/nomad-pot-driver 99 [plugin_dir]: /docs/configuration#plugin_dir 100 [pot-github-repo]: https://github.com/pizzamig/pot 101 [pot-install-guide]: https://github.com/pizzamig/pot/blob/master/share/doc/pot/Installation.md