Skip to content

Update VERSION (#99) #102

Update VERSION (#99)

Update VERSION (#99) #102

Workflow file for this run

name: Build Vectordb Docker Image for linux/amd64 and linux/arm64
on:
push:
branches: [ "main" ]
paths: ['VERSION']
jobs:
build:
name: Build All-in-One Vectordb Docker Image
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Get Current Date
id: date
run: echo "::set-output name=date::$(date +'%Y%m%d%H%M%S')"
- name: Build
env:
DOCKER_HUB_REPOSITORY: epsilla/vectordb
SHA_TAG: ${{ github.sha }}
run: |
export IMAGE_TAG=${{ steps.date.outputs.date }};
echo "IMAGE_TAG: ${IMAGE_TAG}";
export IMAGE_TAG_LATEST="latest";
echo "SHA: ${SHA_TAG}";
export RELEASE_TAG=`cat VERSION`;
echo "RELEASE_TAG: ${RELEASE_TAG}";
cd engine;
# echo "========Build docker image for amd64 firstly========";
# docker build --pull --build-arg="RELEASE_VERSION=${IMAGE_TAG}" \
# --label "org.opencontainers.image.description"="Official Epsilla Vector Database Image" \
# --label "org.opencontainers.image.documentation"="https://epsilla-inc.gitbook.io/epsilladb" \
# --label "org.opencontainers.image.source"="https://github.com/epsilla-cloud/vectordb" \
# --label "org.opencontainers.image.title"="Epsilla Vector Database" \
# --label "org.opencontainers.image.url"="https://epsilla.com" \
# --label "org.opencontainers.image.vendor"="Epsilla" \
# --label "org.opencontainers.image.version"=${IMAGE_TAG} \
# -f Dockerfile -t ${DOCKER_HUB_REPOSITORY}:${IMAGE_TAG}-amd64 .;
# docker push ${DOCKER_HUB_REPOSITORY}:${IMAGE_TAG}-amd64;
echo "========Build allinone docker image both for amd64 and arm64========"
wget https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-amd64
chmod +x buildx-v0.11.2.linux-amd64
mkdir -p $HOME/.docker/cli-plugins
mv buildx-v0.11.2.linux-amd64 $HOME/.docker/cli-plugins/docker-buildx
docker buildx create --use
docker buildx ls
docker buildx build --build-arg="RELEASE_VERSION=v${RELEASE_TAG}-${IMAGE_TAG}" \
--platform linux/amd64,linux/arm64 \
--label "org.opencontainers.image.description"="Official Epsilla Vector Database Image" \
--label "org.opencontainers.image.documentation"="https://epsilla-inc.gitbook.io/epsilladb" \
--label "org.opencontainers.image.source"="https://github.com/epsilla-cloud/vectordb" \
--label "org.opencontainers.image.title"="Epsilla Vector Database" \
--label "org.opencontainers.image.url"="https://epsilla.com" \
--label "org.opencontainers.image.vendor"="Epsilla" \
--label "org.opencontainers.image.version"=${RELEASE_TAG} \
--pull \
--push \
-t ${DOCKER_HUB_REPOSITORY}:${RELEASE_TAG} \
-t ${DOCKER_HUB_REPOSITORY}:${IMAGE_TAG_LATEST} .