Skip to content

Commit

Permalink
Use the current version in the Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
jefmathiot committed Feb 25, 2015
1 parent ad30414 commit 469eec3
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 10 deletions.
15 changes: 9 additions & 6 deletions build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
FROM ubuntu:trusty
MAINTAINER ServeBox ElectricSheep.io <humans@electricsheep.io>
FROM ubuntu:14.04
MAINTAINER ServeBox / ElectricSheep.IO <humans@electricsheep.io>

WORKDIR /electricsheep
RUN apt-get update && apt-get install -y \
gnupg

RUN mkdir /electricsheep/pkg
ADD pkg/electric-sheep-ubuntu_0.2.1-1_amd64.deb /electricsheep/pkg/electric-sheep-ubuntu_0.2.1-1_amd64.deb
ADD pkg/electric-sheep-docker.deb /tmp/electric-sheep-docker.deb
RUN dpkg -i /tmp/electric-sheep-docker.deb

RUN dpkg -i /electricsheep/pkg/electric-sheep-ubuntu_0.2.1-1_amd64.deb
WORKDIR /electric_sheep

ENTRYPOINT ["electric_sheep"]
14 changes: 10 additions & 4 deletions build/build-all.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
#!/bin/bash

cd vagrant
vagrant up --provision && vagrant halt
BUILD_DIR=`pwd`

ES_VERSION=$(ruby -r '../lib/electric_sheep/version.rb' -e "puts ElectricSheep::VERSION")

cd ..
cd $BUILD_DIR/vagrant
vagrant up --provision && vagrant halt

docker build --no-cache=true .
cd $BUILD_DIR
rm -f pkg/electric-sheep-docker.deb
cp pkg/electric-sheep-ubuntu_${ES_VERSION}-1_amd64.deb pkg/electric-sheep-docker.deb
docker build --no-cache -t servebox/electric_sheep .
docker tag servebox/electric_sheep:latest servebox/electric_sheep:${ES_VERSION}

0 comments on commit 469eec3

Please sign in to comment.