Skip to content

Commit c854452

Browse files
committed
[nixpacks] enable docker buildx
1 parent 550cdc6 commit c854452

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

nixpacks/src/dagger/lib.ts

+5
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,15 @@ export const getDirectory = async (
2323
};
2424

2525
export const docker = (version = "24.0", cached = false) => {
26+
const buildx = dag.container().from("docker/buildx-bin").file("/buildx");
2627
let ctr = dag
2728
.container()
2829
.from(`docker:${version}-dind`)
30+
.withEnvVariable("DOCKER_CLI_EXPERIMENTAL", "enabled")
2931
.withoutEntrypoint()
32+
.withExec(["mkdir", "-p", "/usr/libexec/docker/cli-plugins"])
33+
.withFile("/usr/libexec/docker/cli-plugins/docker-buildx", buildx)
34+
.withExec(["docker", "buildx", "version"])
3035
.withExposedPort(2375);
3136

3237
if (cached) {

0 commit comments

Comments
 (0)