diff --git a/.travis.yml b/.travis.yml index 7cad5ee..ebd9303 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,13 +1,13 @@ os: linux services: - - docker + - docker script: - - docker build --build-arg BUILD_DATE="$(date --rfc-3339=seconds | sed 's/ /T/')" --build-arg VCS_REF="$(echo $TRAVIS_COMMIT | cut -c -7)" --tag otherguy/dropbox:latest . + - docker build --build-arg VERSION="${TRAVIS_BRANCH}" --build-arg BUILD_DATE="$(date --rfc-3339=seconds | sed 's/ /T/')" --build-arg VCS_REF="$(echo $TRAVIS_COMMIT | cut -c -7)" --tag otherguy/dropbox:latest . before_deploy: - - echo "${DOCKERHUB_TOKEN}" | docker login -u "${DOCKERHUB_USERNAME}" --password-stdin && echo "${GITHUB_TOKEN}" | docker login docker.pkg.github.com -u "${GITHUB_USERNAME}" --password-stdin + - echo "${DOCKERHUB_TOKEN}" | docker login -u "${DOCKERHUB_USERNAME}" --password-stdin && echo "${GITHUB_TOKEN}" | docker login docker.pkg.github.com -u "${GITHUB_USERNAME}" --password-stdin deploy: - provider: script diff --git a/Dockerfile b/Dockerfile index 52eb357..3bdff85 100644 --- a/Dockerfile +++ b/Dockerfile @@ -65,6 +65,7 @@ ARG BUILD_DATE="" # http://label-schema.org/rc1/ LABEL org.label-schema.schema-version "1.0" LABEL org.label-schema.name "Dropbox" +LABEL org.label-schema.version "${VERSION}" LABEL org.label-schema.build-date "${BUILD_DATE}" LABEL org.label-schema.description "Standalone Dropbox client" LABEL org.label-schema.vcs-url "https://github.com/otherguy/docker-dropbox" diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 35b38dd..2b71f24 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -105,6 +105,6 @@ sleep 5 # Dropbox likes to restart itself. In that case, the container will exit! while kill -0 ${DROPBOX_PID} 2> /dev/null; do [ -d "/proc/${DROPBOX_PID}" ] && [ -f "/opt/dropbox/.dropbox/info.json" ] && gosu dropbox dropbox status - /usr/bin/find /tmp -maxdepth 1 -type d -mtime +1 -exec rm -rf {} \; + /usr/bin/find /tmp/ -maxdepth 1 -type d -mtime +1 ! -path /tmp/ -exec rm -rf {} \; /bin/sleep ${POLLING_INTERVAL} done