Skip to content
This repository has been archived by the owner on Sep 24, 2019. It is now read-only.

Commit

Permalink
Added a Dockerfile for experimenting with precompiled bins
Browse files Browse the repository at this point in the history
I put this together for my own purposes but sharing here as it's likely
useful for others. A couple of related thoughts:

* I'll update the docs with instructions for mounting providers for
  testing once #34 is
  resolved.
* I could have used the new multi-state builds to avoid some of the
  apt wranging, but left this way for now until multi-stage builds works
  it's way into a stable Docker release
* This only supports building from the precompiled binary. I'll take a
  run at converting the HACKING instructions at some point so you can
  build using Docker, that should be a separate PR

I also haven't pushed an image to Docker Hub. I would be happy to do
that if useful or hold off for now.
  • Loading branch information
garethr authored and lutter committed Jun 26, 2017
1 parent 0b73692 commit a5641d1
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
19 changes: 19 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM ubuntu:latest
MAINTAINER Gareth Rushgrove "[email protected]"

ARG LIBRAL_DOWNLOAD_LOCATION="http://download.augeas.net/libral/"
ARG LIBRAL_FILENAME="ralsh-latest.tgz"

RUN apt-get update && \
apt-get install --no-install-recommends -y wget && \
wget "${LIBRAL_DOWNLOAD_LOCATION}${LIBRAL_FILENAME}" && \
tar zxvf "$LIBRAL_FILENAME" -C /opt && \
apt-get remove --purge -y wget && \
apt-get autoremove -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
rm "$LIBRAL_FILENAME"

ENV PATH=/opt/ral/bin:$PATH

ENTRYPOINT ["/opt/ral/bin/ralsh"]
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,27 @@ In case you do need to build from source, which is not required for
provider development, only if you want to work on the core libral library,
[this document](HACKING.md) contains instructions on building `libral`.


### Docker

You can also try out `libral` in the context of a Docker container. The
Dockerfile in the repository allows for building an image quickly based
on the above mentioned precompiled tarball.

```
docker build -t puppet/libral .
```

Running this can then be done with Docker, for instance the following
invocation will launch `ralsh` in the context of the container.

```
docker run --rm -t puppet/libral
```

This is intended for exploring the CLI and experimenting with providers.


## Usage

After you build `libral`, or after you download and unpack the
Expand Down

0 comments on commit a5641d1

Please sign in to comment.