Sfoglia il codice sorgente

Merge pull request #3427 from tianon/stub-deb-init-config

Add stubbed and commented "/etc/default/docker" to our deb package
Tianon Gravi 11 anni fa
parent
commit
acfdfa81be
2 ha cambiato i file con 15 aggiunte e 5 eliminazioni
  1. 1 1
      Dockerfile
  2. 14 4
      hack/make/ubuntu

+ 1 - 1
Dockerfile

@@ -72,7 +72,7 @@ RUN	cd /usr/local/go/src && bash -xc 'for platform in $DOCKER_CROSSPLATFORMS; do
 RUN	go get code.google.com/p/go.tools/cmd/cover
 RUN	go get code.google.com/p/go.tools/cmd/cover
 
 
 # TODO replace FPM with some very minimal debhelper stuff
 # TODO replace FPM with some very minimal debhelper stuff
-RUN	gem install --no-rdoc --no-ri fpm
+RUN	gem install --no-rdoc --no-ri fpm --version 1.0.1
 
 
 # Setup s3cmd config
 # Setup s3cmd config
 RUN	/bin/echo -e '[default]\naccess_key=$AWS_ACCESS_KEY\nsecret_key=$AWS_SECRET_KEY' > /.s3cfg
 RUN	/bin/echo -e '[default]\naccess_key=$AWS_ACCESS_KEY\nsecret_key=$AWS_SECRET_KEY' > /.s3cfg

+ 14 - 4
hack/make/ubuntu

@@ -31,6 +31,20 @@ bundle_ubuntu() {
 	mkdir -p $DIR/lib/systemd
 	mkdir -p $DIR/lib/systemd
 	cp -R contrib/init/systemd $DIR/lib/systemd/system
 	cp -R contrib/init/systemd $DIR/lib/systemd/system
 
 
+	mkdir -p $DIR/etc/default
+	cat > $DIR/etc/default/docker <<'EOF'
+# Docker Upstart and SysVinit configuration file
+
+# Customize location of Docker binary (especially for development testing).
+#DOCKER="/usr/local/bin/docker"
+
+# Use DOCKER_OPTS to modify the daemon startup options.
+#DOCKER_OPTS="-dns 8.8.8.8"
+
+# If you need Docker to use an HTTP proxy, it can also be specified here.
+#export http_proxy=http://127.0.0.1:3128/
+EOF
+
 	# Copy the binary
 	# Copy the binary
 	# This will fail if the binary bundle hasn't been built
 	# This will fail if the binary bundle hasn't been built
 	mkdir -p $DIR/usr/bin
 	mkdir -p $DIR/usr/bin
@@ -120,12 +134,8 @@ EOF
 		    --maintainer "$PACKAGE_MAINTAINER" \
 		    --maintainer "$PACKAGE_MAINTAINER" \
 		    --url "$PACKAGE_URL" \
 		    --url "$PACKAGE_URL" \
 		    --license "$PACKAGE_LICENSE" \
 		    --license "$PACKAGE_LICENSE" \
-		    --config-files /etc/init/docker.conf \
-		    --config-files /etc/init.d/docker \
-		    --config-files /etc/default/docker \
 		    --deb-compression xz \
 		    --deb-compression xz \
 		    -t deb .
 		    -t deb .
-		# note: the --config-files lines have to be duplicated to stop overwrite on package upgrade (since we have to use this funky virtual package)
 	)
 	)
 }
 }