feat(images): initial pass at new Dockerfiles

pull/291/head
Adam Reese 9 years ago
parent f3525d9668
commit 3cdf4cb3f4

@ -0,0 +1,24 @@
FROM alpine:3.3
COPY . /
# install common packages
RUN apk add --update-cache curl python
WORKDIR /opt
# install pip
RUN curl -sSL https://raw.githubusercontent.com/pypa/pip/7.1.2/contrib/get-pip.py | python -
# install dependencies
RUN pip install --disable-pip-version-check --no-cache-dir -r /opt/expansion/requirements.txt
# cleanup.
RUN apk del --purge \
curl \
python \
&& rm -rf /var/cache/apk/*
# define execution environment
CMD ["/bin/expandybird", "-expansion_binary", "/opt/expansion/expansion.py"]
EXPOSE 8000

@ -0,0 +1,24 @@
DOCKER_REGISTRY := gcr.io
PREFIX := $(DOCKER_REGISTRY)/$(PROJECT)
IMAGE ?= expandybird
TAG ?= git-$(shell git rev-parse --short HEAD)
FULL_IMAGE := $(PREFIX)/$(IMAGE)
.PHONY: container
container: binary expansion
docker build -t $(FULL_IMAGE):latest -f Dockerfile .
docker tag $(FULL_IMAGE):latest $(FULL_IMAGE):$(TAG)
.PHONY: push
push: container
ifeq ($(DOCKER_REGISTRY),gcr.io)
gcloud docker push $(PREFIX)/$(IMAGE):$(TAG)
else
docker push $(PREFIX)/$(IMAGE):$(TAG)
endif
expansion:
cp -R ../../expansion ./opt
binary:
cp ../../bin/linux-amd64/expandybird ./bin

@ -0,0 +1,4 @@
FROM alpine:3.3
COPY . /
EXPOSE 8080
CMD ["/bin/manager", "--kubectl=/bin/kubectl"]

@ -0,0 +1,27 @@
DOCKER_REGISTRY := gcr.io
PREFIX := $(DOCKER_REGISTRY)/$(PROJECT)
IMAGE ?= manager
TAG ?= git-$(shell git rev-parse --short HEAD)
FULL_IMAGE := $(PREFIX)/$(IMAGE)
KUBE_VERSION ?= v1.1.7
.PHONY: container
container: binary kubectl
docker build -t $(FULL_IMAGE):latest -f Dockerfile .
docker tag $(FULL_IMAGE):latest $(FULL_IMAGE):$(TAG)
.PHONY: push
push: container
ifeq ($(DOCKER_REGISTRY),gcr.io)
gcloud docker push $(PREFIX)/$(IMAGE):$(TAG)
else
docker push $(PREFIX)/$(IMAGE):$(TAG)
endif
binary:
cp ../../bin/linux-amd64/manager ./bin
kubectl:
curl -fsSL -o bin/kubectl https://storage.googleapis.com/kubernetes-release/release/${KUBE_VERSION}/bin/linux/amd64/kubectl
chmod +x bin/kubectl

@ -0,0 +1,4 @@
FROM alpine:3.3
COPY . /
EXPOSE 8080
CMD ["/bin/resourcifier", "--kubectl=/bin/kubectl"]

@ -0,0 +1,27 @@
DOCKER_REGISTRY := gcr.io
PREFIX := $(DOCKER_REGISTRY)/$(PROJECT)
IMAGE ?= resourcifier
TAG ?= git-$(shell git rev-parse --short HEAD)
FULL_IMAGE := $(PREFIX)/$(IMAGE)
KUBE_VERSION ?= v1.1.7
.PHONY: container
container: binary kubectl
docker build -t $(FULL_IMAGE):latest -f Dockerfile .
docker tag $(FULL_IMAGE):latest $(FULL_IMAGE):$(TAG)
.PHONY: push
push: container
ifeq ($(DOCKER_REGISTRY),gcr.io)
gcloud docker push $(PREFIX)/$(IMAGE):$(TAG)
else
docker push $(PREFIX)/$(IMAGE):$(TAG)
endif
binary:
cp ../../bin/linux-amd64/resourcifier ./bin
kubectl:
curl -fsSL -o bin/kubectl https://storage.googleapis.com/kubernetes-release/release/${KUBE_VERSION}/bin/linux/amd64/kubectl
chmod +x bin/kubectl
Loading…
Cancel
Save