Skip to content

Commit

Permalink
Merge pull request #18 from opiethehokie/docker
Browse files Browse the repository at this point in the history
Dockerfiles for binaries
  • Loading branch information
jgawor committed Sep 14, 2015
2 parents 32e0226 + c179961 commit 376234c
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 2 deletions.
21 changes: 21 additions & 0 deletions Dockerfile.libuv
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# To build libuv and extract the files from the Docker container:
# export CF_STACK=cflinuxfs2
# export LIBUV_VERSION=1.4.2
# cat Dockerfile.libuv | envsubst | docker build -t libuv-${CF_STACK}-${LIBUV_VERSION} -
# docker run -v /somehostdir:/built --rm libuv-${CF_STACK}-${LIBUV_VERSION} /bin/bash -c "cd /usr/local && tar czf /built/libuv-${CF_STACK}-${LIBUV_VERSION}.tar.gz ./include/uv* ./lib/libuv*"

FROM cloudfoundry/$CF_STACK

RUN apt-get -qq update && apt-get -qqy install curl \
autoconf \
automake \
build-essential \
libtool

RUN curl -sSL https://github.com/libuv/libuv/archive/v${LIBUV_VERSION}.tar.gz | tar zxfv - -C /usr/local/src \
&& cd /usr/local/src/libuv-$LIBUV_VERSION \
&& sh autogen.sh \
&& ./configure \
&& make \
&& make install \
&& rm -rf /usr/local/src/libuv-$LIBUV_VERSION
20 changes: 20 additions & 0 deletions Dockerfile.mono
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# To build libuv and extract the files from the Docker container:
# export CF_STACK=cflinuxfs2
# export MONO_RELEASE=4.0.1.44
# cat Dockerfile.mono | envsubst | docker build -t libuv-${CF_STACK}-${LIBUV_VERSION} -
# docker run -v /somehostdir:/built --rm mono-${CF_STACK}-${MONO_RELEASE} tar czf /built/mono-${CF_STACK}-${MONO_RELEASE}.tar.gz -C /app ./mono

FROM cloudfoundry/$CF_STACK

RUN apt-get -qq update && apt-get -y install curl
RUN apt-get -qq update && apt-get -y --force-yes install unzip git-core automake libtool autoconf \
autotools-dev gettext mono-devel

RUN git clone https://github.com/mono/mono

WORKDIR /mono
RUN git checkout tags/mono-$MONO_RELEASE
RUN mkdir -p /app/mono; ./autogen.sh -prefix=/app/mono
RUN make get-monolite-latest
RUN make
RUN make install
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,19 @@ Disconnected environments are not fully supported. The .NET Version Manager, .NE
BUNDLE_GEMFILE=cf.Gemfile bundle
```

3. Build the buildpack
3. Build the binary dependencies (optional)

If you need to rebuild these, to change a version for example, see the included Dockerfiles. They contain comments specifying the commands to run. Then update manifest.yml to point to your files.

4. Build the buildpack

`uncached` means a TAR files containing Mono and libuv will be downloaded the first time an application is staged, and `cached` means they will be packaged in the buildpack ZIP.

```shell
BUNDLE_GEMFILE=cf.Gemfile bundle exec buildpack-packager [ uncached | cached ]
```

4. Use in Cloud Foundry
5. Use in Cloud Foundry

Upload the buildpack to your Cloud Foundry and optionally specify it by name

Expand Down

0 comments on commit 376234c

Please sign in to comment.