mirror of
https://github.com/mongodb/mongo.git
synced 2024-11-24 00:17:37 +01:00
SERVER-90857 Set docker data dir before antithesis suites run (#22547)
GitOrigin-RevId: 54d3202074f8b0711a570fd0ec2c3313a07646dc
This commit is contained in:
parent
0a83ef910a
commit
7bbf9d4b8a
@ -28,6 +28,20 @@ sudo docker logout
|
||||
sudo docker rm $(docker ps -a -q) --force || echo "No pre-existing containers"
|
||||
sudo docker network prune --force
|
||||
|
||||
# Temporary fix until DEVPROD-6961 is complete
|
||||
# move docker data dir out of the root partition
|
||||
sudo service docker stop
|
||||
sudo mkdir -p /data/mci/docker
|
||||
if ! sudo jq -e . /etc/docker/daemon.json; then
|
||||
echo "docker daemon.json did not exist or was invalid"
|
||||
echo "setting docker daemon.json to {}"
|
||||
sudo sh -c 'echo "{}" > /etc/docker/daemon.json'
|
||||
fi
|
||||
MODIFIED_JSON=$(sudo jq '."data-root" |= "/data/mci/docker"' /etc/docker/daemon.json)
|
||||
sudo echo "${MODIFIED_JSON}" | sudo tee /etc/docker/daemon.json
|
||||
echo "docker daemon.json: set data-root to /data/mci/docker"
|
||||
sudo service docker start
|
||||
|
||||
# Login
|
||||
echo "${antithesis_repo_key}" > mongodb.key.json
|
||||
cat mongodb.key.json | sudo docker login -u _json_key https://us-central1-docker.pkg.dev --password-stdin
|
||||
|
Loading…
Reference in New Issue
Block a user