mirror of
https://github.com/spritsail/plex-media-server.git
synced 2025-01-12 03:52:20 +00:00
Update to Docker Sock passthru. Increases performance
This commit is contained in:
parent
3c19fea677
commit
46a1bae944
32
.drone.yml
32
.drone.yml
@ -1,8 +1,3 @@
|
|||||||
services:
|
|
||||||
docker:
|
|
||||||
image: docker:dind
|
|
||||||
privileged: true
|
|
||||||
|
|
||||||
pipeline:
|
pipeline:
|
||||||
identify:
|
identify:
|
||||||
image: docker
|
image: docker
|
||||||
@ -14,38 +9,39 @@ pipeline:
|
|||||||
|
|
||||||
build:
|
build:
|
||||||
image: docker
|
image: docker
|
||||||
environment:
|
volumes:
|
||||||
- DOCKER_HOST=tcp://docker:2375
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
commands:
|
commands:
|
||||||
- docker build -t devbuild .
|
- docker build --no-cache --pull -t ppass-dev .
|
||||||
|
|
||||||
test:
|
test:
|
||||||
image: docker
|
image: docker
|
||||||
environment:
|
volumes:
|
||||||
- DOCKER_HOST=tcp://docker:2375
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
commands:
|
commands:
|
||||||
- apk add --no-cache curl xmlstarlet grep
|
- apk add --no-cache curl xmlstarlet grep
|
||||||
- export CUR_VERSION="$(cat .plex_version)"
|
- export CUR_VERSION="$(cat .plex_version)"
|
||||||
- docker run --name=DEV -d -p 32400:32400 devbuild
|
- CON_NAME=$(docker run --rm -d -p 32400:32400 ppass-dev)
|
||||||
- sleep 25 # Wait for plex to start!
|
- sleep 25 # Wait for plex to start!
|
||||||
- docker logs DEV
|
- docker logs $$CON_NAME
|
||||||
- curl -sSL docker:32400/identity | tee /dev/stderr | xmlstarlet sel -t -v "/MediaContainer/@version" | grep -qw $CUR_VERSION
|
- curl -sSL $(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $$CON_NAME):32400/identity | tee /dev/stderr | xmlstarlet sel -t -v "/MediaContainer/@version" | grep -qw $CUR_VERSION
|
||||||
- docker kill DEV # Not really needed, but keeps things quick
|
- docker kill $$CON_NAME # Not really needed, but keeps things quick
|
||||||
|
|
||||||
publish:
|
publish:
|
||||||
image: docker
|
image: docker
|
||||||
when:
|
when:
|
||||||
event: [push, tag, deployment]
|
event: [push, tag, deployment]
|
||||||
secrets: [ DOCKER_USER, DOCKER_PASS ]
|
secrets: [ DOCKER_USER, DOCKER_PASS ]
|
||||||
environment:
|
volumes:
|
||||||
- DOCKER_HOST=tcp://docker:2375
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
commands:
|
commands:
|
||||||
# Grab just the version, not the hash. Used for tagging
|
# Grab just the version, not the hash. Used for tagging
|
||||||
- export CUR_VERSION=$(cat .plex_version | cut -d \- -f1 )
|
- export CUR_VERSION=$(cat .plex_version | cut -d \- -f1 )
|
||||||
- echo $CUR_VERSION
|
- echo $CUR_VERSION
|
||||||
- echo $DOCKER_USER
|
- echo $DOCKER_USER
|
||||||
- docker tag devbuild adamant/plexmediaserver:plexpass
|
- docker tag ppass-dev adamant/plexmediaserver:plexpass
|
||||||
- docker tag devbuild adamant/plexmediaserver:plexpass-$CUR_VERSION
|
- docker tag ppass-dev adamant/plexmediaserver:plexpass-$CUR_VERSION
|
||||||
- docker login -u $DOCKER_USER -p $DOCKER_PASS
|
- docker login -u $DOCKER_USER -p $DOCKER_PASS
|
||||||
- docker push adamant/plexmediaserver
|
- docker push adamant/plexmediaserver
|
||||||
|
- docker rmi adamant/plexmediaserver:plexpass adamant/plexmediaserver:plexpass-$CUR_VERSION ppass-dev
|
||||||
- echo "CONGRATS! SUCCESSFULLY BUILT PLEX VERSION $CUR_VERSION-PASS"
|
- echo "CONGRATS! SUCCESSFULLY BUILT PLEX VERSION $CUR_VERSION-PASS"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user