Skip to content

Commit

Permalink
Merge pull request #1534 from nextstrain/trs/docker-dev-buildx-builder
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-aksamentov authored Oct 16, 2024
2 parents 4a0603f + 0b05eba commit 09d6e7e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions docker/dev
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,18 @@ if ! docker inspect --format '{{.Id}}' "${DOCKER_REPO}:${DOCKER_TARGET}-${DOCKER
export -f docker_image_maybe_pull
parallel docker_image_maybe_pull ::: "${images[@]}"

BUILDX_BUILDER=nextclade-builder

if ! docker buildx inspect "${BUILDX_BUILDER}" &>/dev/null; then
# Using a persistent builder allows for faster local development.
# However, if this is changed and it was previously run on your machine,
# you may need to remove the builder manually before running the script:
# docker buildx rm "nextclade-builder"
docker buildx create --name "${BUILDX_BUILDER}" --driver docker-container --driver-opt network=host
fi

${NICE} docker buildx build \
--builder="${BUILDX_BUILDER}" \
--file="docker/docker-dev.dockerfile" \
--target="${DOCKER_TARGET}" \
--tag="${DOCKER_REPO}:${DOCKER_TARGET}" \
Expand Down

0 comments on commit 09d6e7e

Please sign in to comment.