Skip to content

Commit

Permalink
Add stubbed and commented "/etc/default/docker" to our deb package
Browse files Browse the repository at this point in the history
This is to especially fix FPM 1.0+ complaining that we told it we have an /etc/default/docker "config file", but didn't actually include one.
  • Loading branch information
tianon committed Jan 2, 2014
1 parent add97f7 commit 7fd6dcc
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

# 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
RUN /bin/echo -e '[default]\naccess_key=$AWS_ACCESS_KEY\nsecret_key=$AWS_SECRET_KEY' > /.s3cfg
Expand Down
18 changes: 14 additions & 4 deletions hack/make/ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,20 @@ bundle_ubuntu() {
mkdir -p $DIR/lib/systemd
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
# This will fail if the binary bundle hasn't been built
mkdir -p $DIR/usr/bin
Expand Down Expand Up @@ -120,12 +134,8 @@ EOF
--maintainer "$PACKAGE_MAINTAINER" \
--url "$PACKAGE_URL" \
--license "$PACKAGE_LICENSE" \
--config-files /etc/init/docker.conf \
--config-files /etc/init.d/docker \
--config-files /etc/default/docker \
--deb-compression xz \
-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)
)
}

Expand Down

0 comments on commit 7fd6dcc

Please sign in to comment.