Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add languages to docs site #599

Merged
merged 6 commits into from Oct 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -2,7 +2,7 @@
[![Go Report Card](https://goreportcard.com/badge/github.com/testcontainers/testcontainers-go)](https://goreportcard.com/report/github.com/testcontainers/testcontainers-go)
[![GoDoc Reference](https://camo.githubusercontent.com/8609cfcb531fa0f5598a3d4353596fae9336cce3/68747470733a2f2f676f646f632e6f72672f6769746875622e636f6d2f79616e6777656e6d61692f686f772d746f2d6164642d62616467652d696e2d6769746875622d726561646d653f7374617475732e737667)](https://pkg.go.dev/github.com/testcontainers/testcontainers-go)

Testcontainers-go is a Go package that makes it simple to create and clean up container-based dependencies for
_Testcontainers for Go_ is a Go package that makes it simple to create and clean up container-based dependencies for
automated integration/smoke tests. The clean, easy-to-use API enables developers to programmatically define containers
that should be run as part of a test and clean up those resources when the test is done.

Expand Down Expand Up @@ -82,5 +82,5 @@ Cleaning up your environment after test completion should be accomplished by def

## Documentation

More information about Testcontainers-go can be found in [./docs](./docs), which is rendered at
More information about _Testcontainers for Go_ can be found in [./docs](./docs), which is rendered at
[golang.testcontainers.org](https://golang.testcontainers.org).
42 changes: 41 additions & 1 deletion docs/css/extra.css
Expand Up @@ -5,6 +5,46 @@ h1, h2, h3, h4, h5, h6 {
}

[data-md-color-scheme="testcontainers"] {
--md-primary-fg-color: #291A3F;
--md-primary-fg-color: #291A3F;
--md-accent-fg-color: #291A3F;
--md-typeset-a-color: #0C94AA;
}

.card-grid {
display: grid;
gap: 10px;
}

@media (min-width: 680px) {
.card-grid {
grid-template-columns: repeat(3, 1fr);
}
}

body .card-grid-item {
display: flex;
align-items: center;
gap: 20px;
border: 1px solid #C3BEDE;
border-radius: 6px;
padding: 16px;
font-weight: 600;
color: #9991B5;
background: #F2F4FE;
}

body .card-grid-item:hover,
body .card-grid-item:focus {
color: #9991B5;
}

.card-grid-item[href] {
color: var(--md-primary-fg-color);
background: transparent;
}

.card-grid-item[href]:hover,
.card-grid-item[href]:focus {
background: #F2F4FE;
color: var(--md-primary-fg-color);
}
2 changes: 1 addition & 1 deletion docs/features/build_from_dockerfile.md
@@ -1,6 +1,6 @@
# Build from Dockerfile

Testcontainers-go gives you the ability to build an image and run a container
_Testcontainers for Go_ gives you the ability to build an image and run a container
from a Dockerfile.

You can do so by specifying a `Context` (the filepath to the build context on
Expand Down
2 changes: 1 addition & 1 deletion docs/features/docker_compose.md
Expand Up @@ -9,7 +9,7 @@ dependent upon.

## Using `docker-compose` directly

Because `docker-compose` v2 is implemented in Go it's possible for _testcontainers-go_ to
Because `docker-compose` v2 is implemented in Go it's possible for _Testcontainers for Go_ to
use [`github.com/docker/compose`](https://github.com/docker/compose) directly and skip any process execution/_docker-compose-in-a-container_ scenario.
The `ComposeStack` API exposes this variant of using `docker-compose` in an easy way.

Expand Down
2 changes: 1 addition & 1 deletion docs/features/garbage_collector.md
Expand Up @@ -27,7 +27,7 @@ on test completion.

[Ryuk](https://github.com/testcontainers/moby-ryuk) (also referred to as
`Reaper` in this package) removes containers/networks/volumes created by
Testcontainers-go after a specified delay. It is a project developed by the
_Testcontainers for Go_ after a specified delay. It is a project developed by the
Testcontainers organization and is used across the board for many of the
different language implementations.

Expand Down
4 changes: 2 additions & 2 deletions docs/features/wait/introduction.md
Expand Up @@ -2,7 +2,7 @@

There are scenarios where your tests need the external services they rely on to reach a specific state that is particularly useful for testing. This is generally approximated as 'Can we talk to this container over the network?' or 'Let's wait until the container is running an reaches certain state'.

Testcontainers-go comes with the concept of `wait strategy`, which allows your tests to actually wait for the most useful conditions to be met, before continuing with their execution. These wait strategies are implemented in the `wait` package.
_Testcontainers for Go_ comes with the concept of `wait strategy`, which allows your tests to actually wait for the most useful conditions to be met, before continuing with their execution. These wait strategies are implemented in the `wait` package.

Below you can find a list of the available wait strategies that you can use:

Expand All @@ -17,7 +17,7 @@ Below you can find a list of the available wait strategies that you can use:

## Startup timeout and Poll interval

When defining a wait strategy, it should define a way to set the startup timeout to avoid waiting infinitely. For that, Testcontainers-go creates a cancel context with 60 seconds defined as timeout.
When defining a wait strategy, it should define a way to set the startup timeout to avoid waiting infinitely. For that, _Testcontainers for Go_ creates a cancel context with 60 seconds defined as timeout.

If the default 60s timeout is not sufficient, it can be updated with the `WithStartupTimeout(startupTimeout time.Duration)` function.

Expand Down
16 changes: 13 additions & 3 deletions docs/index.md
@@ -1,10 +1,20 @@
# Testcontainers

![Testcontainers logo](./logo.png)
<img src="logo.png" alt="Testcontainers logo" width="1024" height="512"/>

## About
<p align="center"><strong>Not using Go? Here are other supported languages!</strong></p>
<div class="card-grid">
<a href="https://testcontainers.org" class="card-grid-item"><img src="language-logos/java.svg"/>Java</a>
<a class="card-grid-item"><img src="language-logos/go.svg"/>Go</a>
<a href="https://dotnet.testcontainers.org/" class="card-grid-item"><img src="language-logos/dotnet.svg"/>.NET</a>
<a href="https://testcontainers-python.readthedocs.io/en/latest/" class="card-grid-item"><img src="language-logos/python.svg"/>Python</a>
<a href="https://github.com/testcontainers/testcontainers-node" class="card-grid-item"><img src="language-logos/nodejs.svg"/>Node.js</a></a>
<a href="https://docs.rs/testcontainers/latest/testcontainers/" class="card-grid-item"><img src="language-logos/rust.svg"/>Rust</a>
</div>

Testcontainers-go is a Go package that makes it simple to create and clean up container-based dependencies for
## About Testcontainers for Go

_Testcontainers for Go_ is a Go package that makes it simple to create and clean up container-based dependencies for
automated integration/smoke tests. The clean, easy-to-use API enables developers to programmatically define containers
that should be run as part of a test and clean up those resources when the test is done.

Expand Down
7 changes: 7 additions & 0 deletions docs/language-logos/dotnet.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions docs/language-logos/go.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions docs/language-logos/java.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions docs/language-logos/nodejs.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions docs/language-logos/python.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
57 changes: 57 additions & 0 deletions docs/language-logos/rust.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/system_requirements/using_colima.md
Expand Up @@ -4,7 +4,7 @@
integrates with Docker's tooling and can be configured in various ways.

As of Colima v0.4.0 it's recommended to set the active Docker context to use
Colima. After the context is set testcontainers-go will automatically be
Colima. After the context is set _Testcontainers for Go_ will automatically be
configured to use Colima.

```bash
Expand Down
6 changes: 3 additions & 3 deletions docs/system_requirements/using_podman.md
@@ -1,14 +1,14 @@
# Using Podman instead of Docker

Testcontainers-go supports the use of Podman (rootless or rootful) instead of Docker.
_Testcontainers for Go_ supports the use of Podman (rootless or rootful) instead of Docker.
In most scenarios no special setup is required.
Testcontainers-go will automatically discover the socket based on the `DOCKER_HOST` or the `TC_HOST` environment variables.
_Testcontainers for Go_ will automatically discover the socket based on the `DOCKER_HOST` or the `TC_HOST` environment variables.
Alternatively you can configure the host with a `.testcontainers.properties` file.
The discovered Docker host is also taken into account when starting a reaper container.

There's currently only one special case where additional configuration is necessary: complex container network scenarios.

By default Testcontainers-go takes advantage of the default network settings both Docker and Podman are applying to newly created containers.
By default _Testcontainers for Go_ takes advantage of the default network settings both Docker and Podman are applying to newly created containers.
It only intervenes in scenarios where a `ContainerRequest` specifies networks and does not include the default network of the current container provider.
Unfortunately the default network for Docker is called _bridge_ where the default network in Podman is called _podman_.
It is not even possible to create a network called _bridge_ with Podman as Podman does not allow creating a network with the same name as an already existing network mode.
Expand Down