Optimize the workflow for publish builder

Signed-off-by: quicksilver <zhifeng.zhang@zilliz.com>
This commit is contained in:
quicksilver 2020-11-20 17:27:04 +08:00 committed by yefu.chen
parent dd3654f953
commit 3b7415a70d
4 changed files with 6 additions and 4 deletions

3
.env
View File

@ -1,4 +1,5 @@
REPO=milvusdb/milvus-distributed-dev
ARCH=amd64
UBUNTU=18.04
DATE_VERSION=20201119-080139
DATE_VERSION=20201120-074234
LATEST_DATE_VERSION=latest

View File

@ -20,6 +20,7 @@ if [ "${1-}" = "gdbserver" ]; then
docker-compose pull --ignore-pull-failures gdbserver
if [ "${CHECK_BUILDER:-}" == "1" ]; then
DATE_VERSION=latest docker-compose pull --ignore-pull-failures gdbserver
docker-compose build gdbserver
fi
docker-compose up -d gdbserver
@ -49,6 +50,7 @@ chmod -R 777 "${DOCKER_VOLUME_DIRECTORY:-.docker}"
docker-compose pull --ignore-pull-failures ubuntu
if [ "${CHECK_BUILDER:-}" == "1" ]; then
DATE_VERSION=latest docker-compose pull --ignore-pull-failures ubuntu
docker-compose build ubuntu
fi
docker-compose run --rm -u "$uid:$gid" ubuntu "$@"

View File

@ -50,7 +50,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
rm -rf /var/lib/apt/lists/*
# Taken from - https://docs.docker.com/engine/examples/running_ssh_service/#environment-variables
RUN mkdir /var/run/sshd && echo 'root:root' | chpasswd && \
useradd -u 2000 -ms /bin/bash debugger && echo 'debugger:milvus' | chpasswd

View File

@ -15,7 +15,7 @@ services:
context: .
dockerfile: build/docker/env/cpu/ubuntu${UBUNTU}/Dockerfile
cache_from:
- ${REPO}:${ARCH}-ubuntu${UBUNTU}-${DATE_VERSION}
- ${REPO}:${ARCH}-ubuntu${UBUNTU}-${LATEST_DATE_VERSION}
shm_size: 2G
environment:
<<: *ccache
@ -33,7 +33,7 @@ services:
context: .
dockerfile: build/docker/env/cpu/ubuntu${UBUNTU}/Dockerfile
cache_from:
- ${REPO}:${ARCH}-ubuntu${UBUNTU}-${DATE_VERSION}
- ${REPO}:${ARCH}-ubuntu${UBUNTU}-${LATEST_DATE_VERSION}
security_opt: # options needed for gdb debugging
- seccomp:unconfined
- apparmor:unconfined