You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/containers/examples/env-vars-and-secrets.mdx
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -151,3 +151,7 @@ export default {
151
151
},
152
152
};
153
153
```
154
+
155
+
## Build-time environment variables
156
+
157
+
Finally, you can also set build-time environment variables that are only available when building the container image via the `image_vars` field in the Wrangler configuration.
Copy file name to clipboardExpand all lines: src/content/docs/containers/get-started.mdx
+8-6Lines changed: 8 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ This example Worker should give you a sense for simple Container use, and provid
17
17
### Ensure Docker is running locally
18
18
19
19
In this guide, we will build and push a container image alongside your Worker code. By default, this process uses
20
-
[Docker](https://www.docker.com/) to do so. You must have Docker running locally when you run `wrangler deploy`. For most people, the best way to install Docker is to follow the [docs for installing Docker Desktop](https://docs.docker.com/desktop/).
20
+
[Docker](https://www.docker.com/) to do so. You must have Docker running locally when you run `wrangler deploy`. For most people, the best way to install Docker is to follow the [docs for installing Docker Desktop](https://docs.docker.com/desktop/). Other tools like [Colima](https://github.com/abiosoft/colima) may also work.
21
21
22
22
You can check that Docker is running properly by running the `docker info` command in your terminal. If Docker is running, the command will succeed. If Docker is not running,
23
23
the `docker info` command will hang or return an error including the message "Cannot connect to the Docker daemon".
@@ -29,9 +29,11 @@ the `docker info` command will hang or return an error including the message "Ca
29
29
30
30
Run the following command to create and deploy a new Worker with a container, from the starter template:
When you want to deploy a code change to either the Worker or Container code, you can run the following command using [Wrangler CLI](/workers/wrangler/):
37
39
@@ -40,7 +42,7 @@ When you want to deploy a code change to either the Worker or Container code, yo
40
42
When you run `wrangler deploy`, the following things happen:
41
43
42
44
- Wrangler builds your container image using Docker.
43
-
- Wrangler pushes your image to a [Container Image Registry](/containers/image-management/) that is automatically
45
+
- Wrangler pushes your image to a [Container Image Registry](/containers/platform-details/image-management/) that is automatically
44
46
integrated with your Cloudflare account.
45
47
- Wrangler deploys your Worker, and configures Cloudflare's network to be ready to spawn instances of your container
46
48
@@ -67,7 +69,7 @@ And see images deployed to the Cloudflare Registry with the following command:
67
69
68
70
Now, open the URL for your Worker. It should look something like `https://hello-containers.YOUR_ACCOUNT_NAME.workers.dev`.
69
71
70
-
If you make requests to the paths `/container/1` or `/container/2`, these requests are routed to specific containers.
72
+
If you make requests to the paths `/container/1` or `/container/2`, your Worker routes requests to specific containers.
71
73
Each different path after "/container/" routes to a unique container.
72
74
73
75
If you make requests to `/lb`, you will load balanace requests to one of 3 containers chosen at random.
Copy file name to clipboardExpand all lines: src/content/docs/containers/index.mdx
+24-13Lines changed: 24 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,8 @@ With Containers you can run:
45
45
- Applications and libraries that require a full filesystem, specific runtime, or Linux-like environment
46
46
- Existing applications and tools that have been distributed as container images
47
47
48
-
Container instances are spun up on-demand and controlled by code you write in your [Worker](/workers). Instead of chaining together API calls or writing Kubernetes operators, you just write JavaScript:
48
+
Container instances are spun up on-demand and controlled by code you write in your [Worker](/workers). Instead of chaining together API calls or writing Kubernetes operators, you just write JavaScript:
49
+
49
50
<Tabs>
50
51
<TabItemlabel="Worker Code">
51
52
```js
@@ -57,14 +58,14 @@ export class MyContainer extends Container {
0 commit comments