Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
140 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
src/ | ||
dist/ | ||
cedar-stack/ | ||
cedar-14-stack/ | ||
jemalloc-cedar/ | ||
jemalloc-cedar-14/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
default: cedar cedar-14 | ||
|
||
cedar: dist/cedar/jemalloc-3.6.0-1.tar.gz | ||
|
||
cedar-14: dist/cedar-14/jemalloc-3.6.0-1.tar.gz | ||
|
||
dist/cedar/jemalloc-3.6.0-1.tar.gz: jemalloc-cedar | ||
docker cp $<:/tmp/jemalloc-cedar.tar.gz . | ||
mkdir -p $$(dirname $@) | ||
mv jemalloc-cedar.tar.gz $@ | ||
|
||
dist/cedar-14/jemalloc-3.6.0-1.tar.gz: jemalloc-cedar-14 | ||
docker cp $<:/tmp/jemalloc-cedar-14.tar.gz . | ||
mkdir -p $$(dirname $@) | ||
mv jemalloc-cedar-14.tar.gz $@ | ||
|
||
clean: | ||
rm -rf src/ cedar*/*.sh dist/ jemalloc-cedar*/*.tar.* | ||
-docker rm jemalloc-cedar | ||
-docker rm jemalloc-cedar-14 | ||
|
||
src/jemalloc.tar.bz2: | ||
mkdir -p $$(dirname $@) | ||
curl -sL http://www.canonware.com/download/jemalloc/jemalloc-3.6.0.tar.bz2 -o $@ | ||
|
||
.PHONY: cedar-stack | ||
|
||
cedar-stack: cedar-stack/cedar.sh | ||
@(docker images -q mojodna/$@ | wc -l | grep 1 > /dev/null) || \ | ||
docker build --rm -t mojodna/$@ $@ | ||
|
||
cedar-stack/cedar.sh: | ||
curl -sLR https://raw.githubusercontent.com/heroku/stack-images/master/bin/cedar.sh -o $@ | ||
|
||
.PHONY: cedar-14-stack | ||
|
||
cedar-14-stack: cedar-14-stack/cedar-14.sh | ||
@(docker images -q mojodna/$@ | wc -l | grep 1 > /dev/null) || \ | ||
docker build --rm -t mojodna/$@ $@ | ||
|
||
cedar-14-stack/cedar-14.sh: | ||
curl -sLR https://raw.githubusercontent.com/heroku/stack-images/master/bin/cedar-14.sh -o $@ | ||
|
||
.PHONY: jemalloc-cedar | ||
|
||
jemalloc-cedar: cedar-stack jemalloc-cedar/jemalloc.tar.bz2 | ||
docker build --rm -t mojodna/$@ $@ | ||
-docker rm $@ | ||
docker run --name $@ mojodna/$@ /bin/echo $@ | ||
|
||
jemalloc-cedar/jemalloc.tar.bz2: src/jemalloc.tar.bz2 | ||
ln -f $< $@ | ||
|
||
.PHONY: jemalloc-cedar-14 | ||
|
||
jemalloc-cedar-14: cedar-14-stack jemalloc-cedar-14/jemalloc.tar.bz2 | ||
docker build --rm -t mojodna/$@ $@ | ||
-docker rm $@ | ||
docker run --name $@ mojodna/$@ /bin/echo $@ | ||
|
||
jemalloc-cedar-14/jemalloc.tar.bz2: src/jemalloc.tar.bz2 | ||
ln -f $< $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
FROM ubuntu:14.04 | ||
|
||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
# Initialize cedar-14 stack | ||
ADD ./cedar-14.sh /tmp/cedar-14.sh | ||
RUN \ | ||
/bin/bash /tmp/cedar-14.sh | ||
|
||
RUN \ | ||
apt-get upgrade -y | ||
|
||
ADD ./postgresql.tar.gz /tmp | ||
RUN \ | ||
mkdir -p /app/vendor && \ | ||
cd /tmp/postgresql-* && \ | ||
./configure --prefix=/app/vendor/pgsql --with-openssl | ||
|
||
RUN \ | ||
cd /tmp/postgresql-* && \ | ||
make -C src/bin install-strip && \ | ||
cp src/backend/utils/fmgroids.h src/include/utils/fmgroids.h && \ | ||
make -C src/include install-strip && \ | ||
make -C src/interfaces install-strip | ||
|
||
RUN \ | ||
cd /app/vendor/pgsql && \ | ||
tar zcf /tmp/pgsql-cedar-14-stack.tar.gz . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FROM ubuntu:10.04 | ||
|
||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
# Initialize cedar stack | ||
ADD ./cedar.sh /tmp/cedar.sh | ||
RUN \ | ||
/bin/bash /tmp/cedar.sh | ||
|
||
RUN \ | ||
apt-get upgrade -y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FROM mojodna/cedar-14-stack | ||
|
||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
RUN \ | ||
apt-get upgrade -y | ||
|
||
ADD ./jemalloc.tar.bz2 /tmp | ||
RUN \ | ||
cd /tmp/jemalloc-* && \ | ||
./configure --prefix=/app/vendor/jemalloc && \ | ||
make install_bin install_include install_lib_shared install_lib_static && \ | ||
cd /app/vendor/jemalloc && \ | ||
tar zcf /tmp/jemalloc-cedar-14.tar.gz . | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM mojodna/cedar-stack | ||
|
||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
RUN \ | ||
apt-get upgrade -y | ||
|
||
ADD ./jemalloc.tar.bz2 /tmp | ||
RUN \ | ||
cd /tmp/jemalloc-* && \ | ||
./configure --prefix=/app/vendor/jemalloc && \ | ||
make install_bin install_include install_lib_shared install_lib_static && \ | ||
cd /app/vendor/jemalloc && \ | ||
tar zcf /tmp/jemalloc-cedar.tar.gz . |