Skip to content

Commit

Permalink
feat(build): Ubuntu image variant support (#417)
Browse files Browse the repository at this point in the history
* feat(build): Building a ubuntu image

* New tagging format: `version-variant`, example: `1.2.3-slim`
* For backward compatibility with the buildtool system and older versions of Halyard, the alpine image variant keeps the original 'naked' version tag i.e. `1.2.3` in addition to the one with the new format.
* The BOM format doesn't change, it's up to Halyard to append the right `-variant` for a tag to fetch the right image on the registry.
* The Dockerfiles are meant to be used directly for ad-hoc image creation by an end-user and by the existing build system through `cloudbuild.yml`.

* Cloudbuild.yaml is now generic and lives in spinnaker/spinnaker buildtool
  • Loading branch information
Pierre Delagrave authored and ezimanyi committed Aug 20, 2019
1 parent 1181e00 commit 2338366
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 45 deletions.
25 changes: 0 additions & 25 deletions Dockerfile

This file was deleted.

6 changes: 6 additions & 0 deletions Dockerfile.compile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM gcr.io/spinnaker-marketplace/gradle_cache
MAINTAINER delivery-engineering@netflix.com
ENV GRADLE_USER_HOME /gradle_cache/.gradle
COPY . compiled_sources
WORKDIR compiled_sources
RUN ./gradlew --no-daemon rosco-web:installDist -x test
11 changes: 4 additions & 7 deletions Dockerfile.slim
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
FROM openjdk:8-jre-alpine

MAINTAINER delivery-engineering@netflix.com

COPY ./rosco-web/build/install/rosco /opt/rosco
COPY ./rosco-web/config /opt/rosco
COPY ./rosco-web/config/packer /opt/rosco/config/packer
COPY --from=compile /compiled_sources/rosco-web/build/install/rosco /opt/rosco
COPY --from=compile /compiled_sources/rosco-web/config /opt/rosco
COPY --from=compile /compiled_sources/rosco-web/config/packer /opt/rosco/config/packer

WORKDIR /packer

Expand All @@ -21,7 +19,6 @@ RUN wget https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get &&
rm get

RUN adduser -D -S spinnaker

USER spinnaker

CMD ["/opt/rosco/bin/rosco"]

23 changes: 23 additions & 0 deletions Dockerfile.ubuntu
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM ubuntu:bionic
MAINTAINER delivery-engineering@netflix.com
COPY --from=compile /compiled_sources/rosco-web/build/install/rosco /opt/rosco
COPY --from=compile /compiled_sources/rosco-web/config /opt/rosco
COPY --from=compile /compiled_sources/rosco-web/config/packer /opt/rosco/config/packer

WORKDIR /packer

RUN apt-get update && apt-get -y install openjdk-8-jre-headless wget unzip curl && \
wget https://releases.hashicorp.com/packer/1.4.2/packer_1.4.2_linux_amd64.zip && \
unzip packer_1.4.2_linux_amd64.zip && \
rm packer_1.4.2_linux_amd64.zip

ENV PATH "/packer:$PATH"

RUN wget https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get && \
chmod +x get && \
./get && \
rm get

RUN adduser --disabled-login --system spinnaker
USER spinnaker
CMD ["/opt/rosco/bin/rosco"]
13 changes: 0 additions & 13 deletions cloudbuild.yaml

This file was deleted.

0 comments on commit 2338366

Please sign in to comment.