Skip to content

Commit

Permalink
Generate JuJu image outside container
Browse files Browse the repository at this point in the history
  • Loading branch information
fsquillace committed Apr 14, 2015
1 parent 7a4e1b1 commit 8ce47fc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
8 changes: 3 additions & 5 deletions Dockerfile
Expand Up @@ -16,13 +16,11 @@ USER juju

RUN mkdir -p /tmp/package-query && cd /tmp/package-query && curl -J -O https://aur.archlinux.org/packages/pa/package-query/PKGBUILD && makepkg -fsc --noconfirm

WORKDIR /tmp/package-query
USER root

RUN pacman --noconfirm -U package-query-*.tar.xz

RUN mkdir /juju && chown juju /juju
RUN pacman --noconfirm -U /tmp/package-query/package-query-*.tar.xz && rm -rf /tmp/package-query /var/cache/pacman/pkg/*

USER juju
WORKDIR /juju
VOLUME ["/tmp/juju-image"]
WORKDIR /tmp/juju-image
ENTRYPOINT ["sh", "-c", "/run.sh"]
8 changes: 3 additions & 5 deletions README.md
@@ -1,10 +1,8 @@



To build image:

docker build -t fee/juju-docker --rm=true .
docker build -t fee/juju-docker .

To run container:
To run container and generate the JuJu image in /tmp/juju-image:

docker run --privileged -it feel/juju-docker /bin/bash
docker run --privileged -v /tmp/juju-image:/tmp/juju-image -t juju
4 changes: 2 additions & 2 deletions run.sh
@@ -1,4 +1,4 @@


git clone https://github.com/fsquillace/juju.git /juju
/juju/bin/juju -b -n
git clone https://github.com/fsquillace/juju.git /tmp/juju
/tmp/juju/bin/juju -b -n

0 comments on commit 8ce47fc

Please sign in to comment.