-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add --network and --add-host to Image (#867)
This adds `--network` and `--add-host` options since those are supported by both builders. (Other requests like #761 will require more thought, since that functionality isn't supported in the v1 API we're using right now.) Two integration tests are included to ensure the behavior with v1 and v2 builders. While I was in here I also added `platform` as an output. Fixes #837. Fixes #862.
- Loading branch information
Showing
19 changed files
with
400 additions
and
35 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,3 @@ | ||
FROM bash AS base | ||
|
||
RUN getent hosts metadata.google.internal # Remember to --add-host! |
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,22 @@ | ||
name: builder-v1 | ||
runtime: yaml | ||
resources: | ||
v1Image: | ||
type: docker:Image | ||
properties: | ||
imageName: docker.io/pulumi/v1-builder:latest | ||
skipPush: true | ||
build: | ||
builderVersion: BuilderV1 | ||
context: . | ||
dockerfile: Dockerfile | ||
platform: linux/amd64 | ||
target: base | ||
cacheFrom: | ||
images: | ||
- docker.io/pulumi/pulumi-base:latest | ||
addHosts: | ||
- metadata.google.internal:169.254.169.254 | ||
network: host | ||
outputs: | ||
platform: ${v1Image.platform} |
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,3 @@ | ||
FROM bash AS base | ||
|
||
RUN getent hosts metadata.google.internal # Remember to --add-host! |
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,22 @@ | ||
name: builder-v2 | ||
runtime: yaml | ||
resources: | ||
v2Image: | ||
type: docker:Image | ||
properties: | ||
imageName: docker.io/pulumi/v2-builder:latest | ||
skipPush: true | ||
build: | ||
builderVersion: BuilderBuildKit | ||
context: . | ||
dockerfile: Dockerfile | ||
platform: linux/amd64 | ||
target: base | ||
cacheFrom: | ||
images: | ||
- docker.io/pulumi/pulumi-base:latest | ||
addHosts: | ||
- metadata.google.internal:169.254.169.254 | ||
network: host | ||
outputs: | ||
platform: ${v2Image.platform} |
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
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
Oops, something went wrong.