Skip to content

Commit 5cf9e30

Browse files
Merge pull request #126 from depot/docs-sync-updates
Update content from depot/app
2 parents 1aafeff + 1c9a527 commit 5cf9e30

File tree

2 files changed

+46
-4
lines changed

2 files changed

+46
-4
lines changed

content/container-builds/how-to-guides/optimal-dockerfiles/node-pnpm-dockerfile.mdx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,18 @@ FROM base AS deps
1313

1414
RUN corepack enable
1515
WORKDIR /app
16-
COPY package.json pnpm-lock.yaml ./
16+
COPY pnpm-lock.yaml ./
1717
RUN --mount=type=cache,id=pnpm,target=/root/.local/share/pnpm/store pnpm fetch --frozen-lockfile
18+
COPY package.json ./
1819
RUN --mount=type=cache,id=pnpm,target=/root/.local/share/pnpm/store pnpm install --frozen-lockfile --prod
1920

2021
FROM base AS build
2122

2223
RUN corepack enable
2324
WORKDIR /app
24-
COPY package.json pnpm-lock.yaml ./
25+
COPY pnpm-lock.yaml ./
2526
RUN --mount=type=cache,id=pnpm,target=/root/.local/share/pnpm/store pnpm fetch --frozen-lockfile
27+
COPY package.json ./
2628
RUN --mount=type=cache,id=pnpm,target=/root/.local/share/pnpm/store pnpm install --frozen-lockfile
2729
COPY . .
2830
RUN pnpm build
@@ -56,8 +58,9 @@ FROM base AS deps
5658

5759
RUN corepack enable
5860
WORKDIR /app
59-
COPY package.json pnpm-lock.yaml ./
61+
COPY pnpm-lock.yaml ./
6062
RUN --mount=type=cache,id=pnpm,target=/root/.local/share/pnpm/store pnpm fetch --frozen-lockfile
63+
COPY package.json ./
6164
RUN --mount=type=cache,id=pnpm,target=/root/.local/share/pnpm/store pnpm install --frozen-lockfile --prod
6265
```
6366

@@ -84,8 +87,9 @@ FROM base AS build
8487

8588
RUN corepack enable
8689
WORKDIR /app
87-
COPY package.json pnpm-lock.yaml ./
90+
COPY pnpm-lock.yaml ./
8891
RUN --mount=type=cache,id=pnpm,target=/root/.local/share/pnpm/store pnpm fetch --frozen-lockfile
92+
COPY package.json ./
8993
RUN --mount=type=cache,id=pnpm,target=/root/.local/share/pnpm/store pnpm install --frozen-lockfile
9094
COPY . .
9195
RUN pnpm build

content/github-actions/overview.mdx

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,41 @@ You can configure this retention policy in your Organization Settings to control
7676
**Available values for time based retention:** 7, 14 **(default)**, and 30 days
7777

7878
**Available values for size based retention:** 25GB, 50GB, 100GB, 150GB, 250GB, 500GB, No limit **(default)**
79+
80+
## Egress Filtering
81+
82+
Egress filtering allows you to control which external services your GitHub Actions runners can connect to.
83+
84+
### Configuration
85+
86+
You can configure egress rules in your organization's settings page under the **GitHub Actions Runners** section. Look for the **Egress Rules** subsection.
87+
88+
By default, Depot Runners will allow outbound connections to any external service. However, you can set the default rule, "`*`", to either `Deny` or `Allow` by default. You can also add specific rules to allow or deny connections to specific IPs, CIDRs, or hostnames.
89+
90+
Below is an example set of rules to get a docker build with golang working:
91+
92+
[![A screenshot of the egress filter rules settings in use](/images/egress-filter-rules.webp)](/images/egress-filter-rules.webp)
93+
94+
This example first applies a blanket deny rule, which blocks all outbound connections by default. Then, it allows connections to the following:
95+
96+
- `auth.docker.io` and `docker.io` for Docker Hub authentication and registry access
97+
- `sum.golang.org` and `proxy.golang.org` for Go modules and proxy access
98+
- `storage.googleapis.com` for Google Cloud Storage access
99+
100+
### Pre-configured rules
101+
102+
To ensure that runners can still connect to necessary services, we automatically add certain IPs and hosts to the allowlist:
103+
104+
- **depot.dev domains**
105+
- **GitHub Actions service IPs**
106+
- **AWS service IPs**
107+
108+
Additionally, `depot build` works out of the box with egress filtering enabled.
109+
110+
### Limitations
111+
112+
There are a few limitations to keep in mind when using egress filtering:
113+
114+
- Tailscale cannot be used together with egress filters because both modify network config in incompatible ways
115+
- Any process that's given root access can modify the egress filter rules, so it's important to ensure that untrusted processes don't run with higher privileges than necessary.
116+
- The egress filter currently isn't supported on macOS and Windows runners

0 commit comments

Comments
 (0)