-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from devzero-inc/staging
merge staging to main
- Loading branch information
Showing
4 changed files
with
69 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# Docker remote build/cache | ||
|
||
### Remote build/cache using `DOCKER_HOST` | ||
|
||
1. Create a new workspace with Docker installed ([How-to](../references/common-tools/build-tools/docker.md)). | ||
2. Make sure your machine is connected to the DevZero network:\ | ||
`dz net connect` | ||
3. Set `DOCKER_HOST` environment variable on your machine to match the DevBox hostname:\ | ||
`export DOCKER_HOST=ssh://devzero@your-devbox-hostname` | ||
4. Verify the installation by running: | ||
|
||
`docker info` | ||
|
||
When you run a `docker build` command, the build context will be sent to the DevBox and the build process will run. | ||
|
||
{% hint style="info" %} | ||
If you're seeing "Host key verification failed" error, try connecting to your DevBox via ssh to verify the fingerprint. | ||
{% endhint %} | ||
|
||
### Remote build using BuildKit | ||
|
||
1. Create a new workspace with Docker installed ([How-to](../references/common-tools/build-tools/docker.md)). | ||
2. Inside your DevBox, install buildkit using Docker Image:\ | ||
`docker run -d --rm --name=remote-buildkitd --privileged -p 1234:1234 moby/buildkit:latest --addr tcp://0.0.0.0:1234`\ | ||
\ | ||
See [Remote driver docs](https://docs.docker.com/build/drivers/remote/) for available options. | ||
3. On your machine, create a new buildx instance:\ | ||
`docker buildx create --name remote-container --driver remote tcp://your-devbox-hostname:1234` | ||
4. Build an image using remote driver (and download it locally):\ | ||
`docker buildx build --builder=remote-container -t test --load .` | ||
|
||
### Remote cache using Docker Registry | ||
|
||
1. Create a new workspace with Docker installed ([How-to](../references/common-tools/build-tools/docker.md)). | ||
2. Inside your DevBox, install the Docker Registry image:\ | ||
`docker run -d -p 5000:5000 --name registry registry:2`\ | ||
\ | ||
See [CNCF Distribution guide](https://distribution.github.io/distribution/) for available options. | ||
3. Make sure your machine is connected to the DevZero network:\ | ||
`dz net connect` | ||
4. Verify you can access the registry from your machine:\ | ||
`curl http://your-devbox-hostname:5000/v2/_catalog` | ||
5. Build and push your image to the registry\ | ||
With Docker:\ | ||
`docker build --push -t your-devbox-hostname:5000/<image> .`\ | ||
\ | ||
With BuildKit remote cache (see previous section): | ||
|
||
```console | ||
docker buildx build --push -t your-devbox-hostname:5000/<image> \ | ||
--cache-to type=registry,ref=your-devbox-hostname:5000/<cache-image> \ | ||
--cache-from type=registry,ref=your-devbox-hostname:5000/<cache-image> | ||
``` | ||
6. Verify the image is available on the machine:\ | ||
`curl http://your-devbox-hostname:5000/v2/_catalog` | ||
|
||
{% hint style="info" %} | ||
If you're getting "http: server gave HTTP response to HTTPS client", try adding the following to your Docker daemon json configuration:\ | ||
\ | ||
`insecure-registries": ["your-devbox-hostname:5000"]` | ||
{% endhint %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,10 @@ | ||
# Connect to an RDS Instance | ||
|
||
## Using a Recipe Step | ||
### Existing Database | ||
|
||
{% hint style="info" %} | ||
**Coming soon...** | ||
{% endhint %} | ||
1. Make sure your followed the [Connecting to AWS](../../how-to-guides/connecting-to-aws.md) guide. | ||
|
||
## From a running Workspace | ||
### New Database | ||
|
||
1. Make sure your followed the [Connecting to AWS](../../how-to-guides/connecting-to-aws.md) guide. | ||
|
||
{% hint style="info" %} | ||
**Coming soon...** | ||
{% endhint %} |