Testcontainers::NginxContainer
Inherits Testcontainers::DockerContainer < Reference < Object
NginxContainer provides a pre-configured container for Nginx.
Example:
container = Testcontainers::NginxContainer.new
container.start
url = "http://#{container.host}:#{container.mapped_port(80)}"
container.stop
container.remove
Constants
NGINX_DEFAULT_IMAGE = "nginx:latest"
NGINX_DEFAULT_PORT = 80
Constructors
Instance methods
port
Sourcestart
Starts the container.
This will:
- Pull the image if not present
- Create the container
- Start the container
- Execute the wait strategy (if any)
Returns self for method chaining.