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
For production Actors, we recommend pinning both the Node.js/Python version and the browser automation library version in your Dockerfile. This ensures reproducible builds and prevents unexpected behavior when new versions are released.
96
+
For production Actors, pin both the Node.js/Python version and the browser automation library version in your Dockerfile. This ensures reproducible builds and prevents unexpected behavior when new versions are released.
97
97
98
98
### Recommended approach
99
99
100
-
**In your Dockerfile**, use a fully pinned tag:
100
+
In your `Dockerfile`, use a fully pinned tag:
101
101
102
102
```dockerfile
103
103
# Pin both Node.js 22 and Playwright 1.52.0
104
104
FROM apify/actor-node-playwright-chrome:22-1.52.0
105
105
```
106
106
107
-
**In your `package.json`**, match the Playwright/Puppeteer version to your Docker image tag:
107
+
In your `package.json`, match the Playwright/Puppeteer version to your Docker image tag:
108
108
109
109
```json
110
110
{
@@ -126,7 +126,7 @@ When the Playwright/Puppeteer version in your `package.json` differs from what's
126
126
127
127
:::
128
128
129
-
### Using `*` as version (legacy approach)
129
+
### Using `*` as version (alternative approach)
130
130
131
131
You may encounter older documentation or templates using `*` as the Playwright/Puppeteer version:
132
132
@@ -140,9 +140,9 @@ You may encounter older documentation or templates using `*` as the Playwright/P
140
140
141
141
The asterisk (`*`) tells npm to use whatever version is already installed, which prevents re-downloading the library. While this approach still works, **pinning specific versions is now preferred** because:
142
142
143
-
1.**Reproducibility** - Your builds will behave the same way regardless of when you build them
144
-
2.**Predictability** - You know exactly which version you're running
145
-
3.**Debugging** - Easier to track down version-specific issues
143
+
1. Reproducibility - Your builds will behave the same way regardless of when you build them
144
+
1.Predictability - You know exactly which version you're running
145
+
1.Debugging - Version-specific issues are easier to track down
0 commit comments