From f386f70ee6734f3504b891ee84d5f7159e337d6a Mon Sep 17 00:00:00 2001 From: Jason Bosco Date: Wed, 9 Oct 2024 16:44:04 -0500 Subject: [PATCH] Update build instructions --- README.md | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8a251cb..55f213d 100644 --- a/README.md +++ b/README.md @@ -146,19 +146,33 @@ pipenv install # Then, open a shell with with the Python environment: pipenv shell +# Enable containerd image store in Docker Engine: https://docs.docker.com/engine/storage/containerd/ +# This allows to build cross-platform images below +# Add the following to +# /etc/docker/daemon.json +# { +# "features": { +# "containerd-snapshotter": true +# } +# } +# sudo systemctl restart docker + +# The following should say containerd, if not follow instructions above +docker info -f '{{ .DriverStatus }}' + # Build a new version of the base Docker container - ONLY NEEDED WHEN WE CHANGE DEPENDENCIES -export SCRAPER_BASE_VERSION="0.8.0" # Only need to change this when we update dependencies +export SCRAPER_BASE_VERSION="0.9.0" # Only need to change this when we update dependencies docker buildx use typesense-builder || docker buildx create --name typesense-builder --driver docker-container --use --bootstrap # use same buildx context for all containers to build -docker buildx build --load -f ./scraper/dev/docker/Dockerfile.base -t typesense/docsearch-scraper-base:${SCRAPER_BASE_VERSION} . +docker buildx build --platform linux/amd64,linux/arm64 --load -f ./scraper/dev/docker/Dockerfile.base -t typesense/docsearch-scraper-base:${SCRAPER_BASE_VERSION} . docker push typesense/docsearch-scraper-base:${SCRAPER_BASE_VERSION} docker tag typesense/docsearch-scraper-base:${SCRAPER_BASE_VERSION} typesense/docsearch-scraper-base:latest docker push typesense/docsearch-scraper-base:latest # Build a new version of the scraper Docker container -export SCRAPER_VERSION="0.9.1" +export SCRAPER_VERSION="0.11.0.rc1" export SCRAPER_BASE_VERSION="latest" docker buildx use typesense-builder || docker buildx create --name typesense-builder --driver docker-container --use --bootstrap # use same buildx context for all containers to build -docker buildx build -f ./scraper/dev/docker/Dockerfile --build-arg SCRAPER_BASE_VERSION=${SCRAPER_BASE_VERSION} -t typesense/docsearch-scraper:${SCRAPER_VERSION} . +docker buildx build --platform linux/amd64,linux/arm64 --load -f ./scraper/dev/docker/Dockerfile --build-arg SCRAPER_BASE_VERSION=${SCRAPER_BASE_VERSION} -t typesense/docsearch-scraper:${SCRAPER_VERSION} . docker push typesense/docsearch-scraper:${SCRAPER_VERSION} docker tag typesense/docsearch-scraper:${SCRAPER_VERSION} typesense/docsearch-scraper:latest docker push typesense/docsearch-scraper:latest