Skip to content

Commit

Permalink
[nixpacks] enable docker buildx
Browse files Browse the repository at this point in the history
  • Loading branch information
tsirysndr committed Mar 10, 2024
1 parent 550cdc6 commit c854452
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions nixpacks/src/dagger/lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,15 @@ export const getDirectory = async (
};

export const docker = (version = "24.0", cached = false) => {
const buildx = dag.container().from("docker/buildx-bin").file("/buildx");
let ctr = dag
.container()
.from(`docker:${version}-dind`)
.withEnvVariable("DOCKER_CLI_EXPERIMENTAL", "enabled")
.withoutEntrypoint()
.withExec(["mkdir", "-p", "/usr/libexec/docker/cli-plugins"])
.withFile("/usr/libexec/docker/cli-plugins/docker-buildx", buildx)
.withExec(["docker", "buildx", "version"])
.withExposedPort(2375);

if (cached) {
Expand Down

0 comments on commit c854452

Please sign in to comment.