Skip to content

Commit 518194b

Browse files
committed
ref(store): reduce image size and use nginx
1 parent 101301b commit 518194b

5 files changed

Lines changed: 35 additions & 14 deletions

File tree

store/base/Dockerfile

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,9 @@ FROM ubuntu-debootstrap:14.04
22

33
ENV DEBIAN_FRONTEND noninteractive
44

5-
# install common packages
6-
RUN apt-get update && apt-get install -y curl net-tools sudo
5+
ADD build.sh /tmp/build.sh
76

8-
# install etcdctl
9-
RUN curl -sSL -o /usr/local/bin/etcdctl https://s3-us-west-2.amazonaws.com/opdemand/etcdctl-v0.4.6 \
10-
&& chmod +x /usr/local/bin/etcdctl
11-
12-
# Use modified confd with a fix for /etc/hosts - see https://github.com/kelseyhightower/confd/pull/123
13-
ADD https://s3-us-west-2.amazonaws.com/opdemand/confd-git-0e563e5 /usr/local/bin/confd
14-
RUN chmod +x /usr/local/bin/confd
15-
16-
RUN curl -sSL 'https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc' | apt-key add -
17-
RUN echo "deb http://ceph.com/debian-firefly trusty main" > /etc/apt/sources.list.d/ceph.list
18-
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -yq ceph
7+
RUN DOCKER_BUILD=true /tmp/build.sh
198

209
# Add shared confd configuration
2110
ADD . /app

store/base/build.sh

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/usr/bin/env bash
2+
3+
if [[ -z $DOCKER_BUILD ]]; then
4+
echo
5+
echo "Note: this script is intended for use by the Dockerfile and not as a way to build the controller locally"
6+
echo
7+
exit 1
8+
fi
9+
10+
DEBIAN_FRONTEND=noninteractive
11+
12+
# install common packages
13+
apt-get update && apt-get install -y curl net-tools sudo
14+
15+
# install etcdctl
16+
curl -sSL -o /usr/local/bin/etcdctl https://s3-us-west-2.amazonaws.com/opdemand/etcdctl-v0.4.6 \
17+
&& chmod +x /usr/local/bin/etcdctl
18+
19+
# Use modified confd with a fix for /etc/hosts - see https://github.com/kelseyhightower/confd/pull/123
20+
curl -sSL https://s3-us-west-2.amazonaws.com/opdemand/confd-git-0e563e5 -o /usr/local/bin/confd
21+
chmod +x /usr/local/bin/confd
22+
23+
curl -sSL 'https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc' | apt-key add -
24+
echo "deb http://ceph.com/debian-firefly trusty main" > /etc/apt/sources.list.d/ceph.list
25+
26+
apt-get update && apt-get install -yq ceph
27+
28+
apt-get clean -y
29+
30+
rm -Rf /usr/share/man /usr/share/doc
31+
rm -rf /tmp/* /var/tmp/*
32+
rm -rf /var/lib/apt/lists/*

store/gateway/Dockerfile.template

100644100755
File mode changed.

store/gateway/bin/boot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,4 +97,4 @@ if [[ ! -z $EXTERNAL_PORT ]]; then
9797

9898
fi
9999

100-
wait
100+
wait

store/gateway/rgw.conf

100644100755
File mode changed.

0 commit comments

Comments
 (0)