From 44673378b656e1fe8769fe7fadb9fff0d6bd1b23 Mon Sep 17 00:00:00 2001 From: Hui Yiqun Date: Mon, 25 Feb 2019 13:12:47 +0800 Subject: [PATCH] dart-pub: move PUB_CACHE outside of /root/ --- dockerfiles/pub-mirror/Dockerfile | 2 ++ pub.sh | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/dockerfiles/pub-mirror/Dockerfile b/dockerfiles/pub-mirror/Dockerfile index 3ef5428..15f5ad8 100644 --- a/dockerfiles/pub-mirror/Dockerfile +++ b/dockerfiles/pub-mirror/Dockerfile @@ -1,6 +1,8 @@ FROM google/dart:2.1.1 MAINTAINER Hui Yiqun +ENV PUB_CACHE /pub-cache + RUN pub global activate pub_mirror CMD /bin/bash diff --git a/pub.sh b/pub.sh index bd181f8..211dda1 100755 --- a/pub.sh +++ b/pub.sh @@ -4,4 +4,4 @@ set -e BASE_URL=${MIRROR_BASE_URL:-"https://mirrors.tuna.tsinghua.edu.cn/dart-pub"} UPSTREAM_URL=${TUNASYNC_UPSTREAM_URL:-"https://pub.dartlang.org/api"} -/root/.pub-cache/bin/pub_mirror --upstream $UPSTREAM_URL --verbose --connections 10 --concurrency 100 "$TUNASYNC_WORKING_DIR" "$BASE_URL" +/pub-cache/bin/pub_mirror --upstream $UPSTREAM_URL --verbose --connections 10 --concurrency 100 "$TUNASYNC_WORKING_DIR" "$BASE_URL"