summaryrefslogtreecommitdiffstats
path: root/dockerfiles
diff options
context:
space:
mode:
authorcrystaldust <juzhenatpku@gmail.com>2014-04-15 23:48:33 -0400
committercrystaldust <juzhenatpku@gmail.com>2014-04-15 23:48:33 -0400
commit066d91e1136249b2192ba6d9b8b14d106c1a1fe6 (patch)
tree5f9141271104b1782b034ae1aad2f508a3d90106 /dockerfiles
parentbb84bb8ac3003fdab62b397a21620ef272582a91 (diff)
downloadgitea-066d91e1136249b2192ba6d9b8b14d106c1a1fe6.tar.gz
gitea-066d91e1136249b2192ba6d9b8b14d106c1a1fe6.zip
Allow the user to config the apt source in build.sh
Diffstat (limited to 'dockerfiles')
-rwxr-xr-xdockerfiles/build.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/dockerfiles/build.sh b/dockerfiles/build.sh
index 272424c872..9b39afa59b 100755
--- a/dockerfiles/build.sh
+++ b/dockerfiles/build.sh
@@ -1,6 +1,10 @@
# Configs of the docker images, you might have specify your own configs here.
+
# type of database, support 'mysql' and 'postgres'
DB_TYPE="postgres"
+# apt source, you can select 'nchc' or 'aliyun' according to your network.
+APT_SOURCE="nchc"
+
DB_PASSWORD="YOUR_DB_PASSWORD"
DB_RUN_NAME="YOUR_DB_RUN_NAME"
HOST_PORT="YOUR_HOST_PORT"
@@ -9,6 +13,8 @@ HOST_PORT="YOUR_HOST_PORT"
sed -i "s/THE_DB_PASSWORD/$DB_PASSWORD/g" images/$DB_TYPE/Dockerfile
# Replace the database root password in gogits image deploy.sh file.
sed -i "s/THE_DB_PASSWORD/$DB_PASSWORD/g" images/gogits/deploy.sh
+# Replace the apt source in gogits image Dockerfile.
+sed -i "s/#$APT_SOURCE#//g" images/gogits/Dockerfile
# Replace the database type in gogits image deploy.sh file.
sed -i "s/THE_DB_TYPE/$DB_TYPE/g" images/gogits/deploy.sh