Skip to content

Commit

Permalink
Added MPL Licenses to Docker images (#3788)
Browse files Browse the repository at this point in the history
* Added mpl licenes

* Updated licenses

* Updated licenses

* Updated to main instead of master

* Updated copy to main
  • Loading branch information
axsaucedo authored Dec 7, 2021
1 parent bd0d4fe commit 655b718
Show file tree
Hide file tree
Showing 7 changed files with 101 additions and 20 deletions.
28 changes: 23 additions & 5 deletions executor/Dockerfile.executor
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,29 @@ COPY k8s/ k8s/
RUN go build -a -o executor cmd/executor/main.go

# Get MPL licensed dependencies
RUN wget -O hashicorp-golang-lru.tar.gz https://github.com/hashicorp/golang-lru/archive/master.tar.gz
RUN wget -O armon-consul-api.tar.gz https://github.com/armon/consul-api/archive/master.tar.gz
RUN wget -O hasicorp-hcl.tar.gz https://github.com/hashicorp/hcl/archive/hcl1.tar.gz
RUN wget -O go-sql-driver-mysql.tar.gz https://github.com/go-sql-driver/mysql/archive/master.tar.gz
RUN wget -O hashicorp-consul.tar.gz https://github.com/hashicorp/consul/archive/main.tar.gz
RUN wget -O hashicorp-errwrap.tar.gz https://github.com/hashicorp/errwrap/archive/master.tar.gz
RUN wget -O hashicorp-go-cleanhttp.tar.gz https://github.com/hashicorp/go-cleanhttp/archive/master.tar.gz
RUN wget -O hashicorp-go-immutable-radix.tar.gz https://github.com/hashicorp/go-immutable-radix/archive/master.tar.gz
RUN wget -O hashicorp-go-multierror.tar.gz https://github.com/hashicorp/go-multierror/archive/master.tar.gz
RUN wget -O hashicorp-go-plugin.tar.gz https://github.com/hashicorp/go-plugin/archive/master.tar.gz
RUN wget -O hashicorp-go-retryablehttp.tar.gz https://github.com/hashicorp/go-retryablehttp/archive/master.tar.gz
RUN wget -O hashicorp-go-rootcerts.tar.gz https://github.com/hashicorp/go-rootcerts/archive/master.tar.gz
RUN wget -O hashicorp-go-sockaddr.tar.gz https://github.com/hashicorp/go-sockaddr/archive/master.tar.gz
RUN wget -O hashicorp-go-uuid.tar.gz https://github.com/hashicorp/go-uuid/archive/master.tar.gz
RUN wget -O hashicorp-go-version.tar.gz https://github.com/hashicorp/go-version/archive/master.tar.gz
RUN wget -O hashicorp-golang-lru.tar.gz https://github.com/hashicorp/golang-lru/archive/master.tar.gz
RUN wget -O hashicorp-hcl.tar.gz https://github.com/hashicorp/hcl/archive/main.tar.gz
RUN wget -O hashicorp-logutils.tar.gz https://github.com/hashicorp/logutils/archive/master.tar.gz
RUN wget -O hashicorp-memberlist.tar.gz https://github.com/hashicorp/memberlist/archive/master.tar.gz
RUN wget -O hashicorp-serf.tar.gz https://github.com/hashicorp/serf/archive/master.tar.gz
RUN wget -O hashicorp-vault.tar.gz https://github.com/hashicorp/vault/archive/master.tar.gz
RUN wget -O hashicorp-yamux.tar.gz https://github.com/hashicorp/yamux/archive/master.tar.gz
RUN wget -O mitchellh-cli.tar.gz https://github.com/mitchellh/cli/archive/master.tar.gz
RUN wget -O mitchellh-gox.tar.gz https://github.com/mitchellh/gox/archive/master.tar.gz
RUN wget -O mozilla-tls-observatory.tar.gz https://github.com/mozilla/tls-observatory/archive/master.tar.gz

# Copy OpenAPI folder and change the permissions
COPY api/rest/openapi/ /openapi/
Expand All @@ -36,9 +56,7 @@ FROM gcr.io/distroless/base-debian10:latest
WORKDIR /
COPY --from=builder /workspace/executor .
COPY licenses/license.txt licenses/license.txt
COPY --from=builder /workspace/hashicorp-golang-lru.tar.gz licenses/mpl_source/hashicorp-golang-lru.tar.gz
COPY --from=builder /workspace/armon-consul-api.tar.gz licenses/mpl_source/armon-consul-api.tar.gz
COPY --from=builder /workspace/hasicorp-hcl.tar.gz licenses/mpl_source/hasicorp-hcl.tar.gz
COPY --from=builder /workspace/*.tar.gz licenses/mpl_source/

# Copy openapi spec and swagger UI files
COPY --from=builder /openapi/ /openapi/
Expand Down
28 changes: 23 additions & 5 deletions executor/Dockerfile.executor.redhat
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,29 @@ COPY k8s/ k8s/
RUN go build -a -o executor cmd/executor/main.go

# Get MPL licensed dependencies
RUN wget -O hashicorp-golang-lru.tar.gz https://github.com/hashicorp/golang-lru/archive/master.tar.gz
RUN wget -O armon-consul-api.tar.gz https://github.com/armon/consul-api/archive/master.tar.gz
RUN wget -O hasicorp-hcl.tar.gz https://github.com/hashicorp/hcl/archive/hcl1.tar.gz
RUN wget -O go-sql-driver-mysql.tar.gz https://github.com/go-sql-driver/mysql/archive/master.tar.gz
RUN wget -O hashicorp-consul.tar.gz https://github.com/hashicorp/consul/archive/main.tar.gz
RUN wget -O hashicorp-errwrap.tar.gz https://github.com/hashicorp/errwrap/archive/master.tar.gz
RUN wget -O hashicorp-go-cleanhttp.tar.gz https://github.com/hashicorp/go-cleanhttp/archive/master.tar.gz
RUN wget -O hashicorp-go-immutable-radix.tar.gz https://github.com/hashicorp/go-immutable-radix/archive/master.tar.gz
RUN wget -O hashicorp-go-multierror.tar.gz https://github.com/hashicorp/go-multierror/archive/master.tar.gz
RUN wget -O hashicorp-go-plugin.tar.gz https://github.com/hashicorp/go-plugin/archive/master.tar.gz
RUN wget -O hashicorp-go-retryablehttp.tar.gz https://github.com/hashicorp/go-retryablehttp/archive/master.tar.gz
RUN wget -O hashicorp-go-rootcerts.tar.gz https://github.com/hashicorp/go-rootcerts/archive/master.tar.gz
RUN wget -O hashicorp-go-sockaddr.tar.gz https://github.com/hashicorp/go-sockaddr/archive/master.tar.gz
RUN wget -O hashicorp-go-uuid.tar.gz https://github.com/hashicorp/go-uuid/archive/master.tar.gz
RUN wget -O hashicorp-go-version.tar.gz https://github.com/hashicorp/go-version/archive/master.tar.gz
RUN wget -O hashicorp-golang-lru.tar.gz https://github.com/hashicorp/golang-lru/archive/master.tar.gz
RUN wget -O hashicorp-hcl.tar.gz https://github.com/hashicorp/hcl/archive/main.tar.gz
RUN wget -O hashicorp-logutils.tar.gz https://github.com/hashicorp/logutils/archive/master.tar.gz
RUN wget -O hashicorp-memberlist.tar.gz https://github.com/hashicorp/memberlist/archive/master.tar.gz
RUN wget -O hashicorp-serf.tar.gz https://github.com/hashicorp/serf/archive/master.tar.gz
RUN wget -O hashicorp-vault.tar.gz https://github.com/hashicorp/vault/archive/master.tar.gz
RUN wget -O hashicorp-yamux.tar.gz https://github.com/hashicorp/yamux/archive/master.tar.gz
RUN wget -O mitchellh-cli.tar.gz https://github.com/mitchellh/cli/archive/master.tar.gz
RUN wget -O mitchellh-gox.tar.gz https://github.com/mitchellh/gox/archive/master.tar.gz
RUN wget -O mozilla-tls-observatory.tar.gz https://github.com/mozilla/tls-observatory/archive/master.tar.gz

# Copy OpenAPI folder and change the permissions
COPY api/rest/openapi/ /openapi/
Expand All @@ -41,9 +61,7 @@ LABEL name="Seldon Executor" \
WORKDIR /
COPY --from=builder /workspace/executor .
COPY licenses/license.txt licenses/license.txt
COPY --from=builder /workspace/hashicorp-golang-lru.tar.gz licenses/mpl_source/hashicorp-golang-lru.tar.gz
COPY --from=builder /workspace/armon-consul-api.tar.gz licenses/mpl_source/armon-consul-api.tar.gz
COPY --from=builder /workspace/hasicorp-hcl.tar.gz licenses/mpl_source/hasicorp-hcl.tar.gz
COPY --from=builder /workspace/*.tar.gz licenses/mpl_source/

RUN yum -y update-minimal --security --sec-severity=Important --sec-severity=Critical

Expand Down
28 changes: 23 additions & 5 deletions operator/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,37 @@ COPY client/ client/
RUN go build -a -o manager main.go

# Get MPL licensed dependencies
RUN wget -O hashicorp-golang-lru.tar.gz https://github.com/hashicorp/golang-lru/archive/master.tar.gz
RUN wget -O armon-consul-api.tar.gz https://github.com/armon/consul-api/archive/master.tar.gz
RUN wget -O hasicorp-hcl.tar.gz https://github.com/hashicorp/hcl/archive/hcl1.tar.gz
RUN wget -O go-sql-driver-mysql.tar.gz https://github.com/go-sql-driver/mysql/archive/master.tar.gz
RUN wget -O hashicorp-consul.tar.gz https://github.com/hashicorp/consul/archive/main.tar.gz
RUN wget -O hashicorp-errwrap.tar.gz https://github.com/hashicorp/errwrap/archive/master.tar.gz
RUN wget -O hashicorp-go-cleanhttp.tar.gz https://github.com/hashicorp/go-cleanhttp/archive/master.tar.gz
RUN wget -O hashicorp-go-immutable-radix.tar.gz https://github.com/hashicorp/go-immutable-radix/archive/master.tar.gz
RUN wget -O hashicorp-go-multierror.tar.gz https://github.com/hashicorp/go-multierror/archive/master.tar.gz
RUN wget -O hashicorp-go-plugin.tar.gz https://github.com/hashicorp/go-plugin/archive/master.tar.gz
RUN wget -O hashicorp-go-retryablehttp.tar.gz https://github.com/hashicorp/go-retryablehttp/archive/master.tar.gz
RUN wget -O hashicorp-go-rootcerts.tar.gz https://github.com/hashicorp/go-rootcerts/archive/master.tar.gz
RUN wget -O hashicorp-go-sockaddr.tar.gz https://github.com/hashicorp/go-sockaddr/archive/master.tar.gz
RUN wget -O hashicorp-go-uuid.tar.gz https://github.com/hashicorp/go-uuid/archive/master.tar.gz
RUN wget -O hashicorp-go-version.tar.gz https://github.com/hashicorp/go-version/archive/master.tar.gz
RUN wget -O hashicorp-golang-lru.tar.gz https://github.com/hashicorp/golang-lru/archive/master.tar.gz
RUN wget -O hashicorp-hcl.tar.gz https://github.com/hashicorp/hcl/archive/main.tar.gz
RUN wget -O hashicorp-logutils.tar.gz https://github.com/hashicorp/logutils/archive/master.tar.gz
RUN wget -O hashicorp-memberlist.tar.gz https://github.com/hashicorp/memberlist/archive/master.tar.gz
RUN wget -O hashicorp-serf.tar.gz https://github.com/hashicorp/serf/archive/master.tar.gz
RUN wget -O hashicorp-vault.tar.gz https://github.com/hashicorp/vault/archive/master.tar.gz
RUN wget -O hashicorp-yamux.tar.gz https://github.com/hashicorp/yamux/archive/master.tar.gz
RUN wget -O mitchellh-cli.tar.gz https://github.com/mitchellh/cli/archive/master.tar.gz
RUN wget -O mitchellh-gox.tar.gz https://github.com/mitchellh/gox/archive/master.tar.gz
RUN wget -O mozilla-tls-observatory.tar.gz https://github.com/mozilla/tls-observatory/archive/master.tar.gz

# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
FROM gcr.io/distroless/base-debian10:latest
WORKDIR /
COPY --from=builder /workspace/manager .
COPY licenses/license.txt licenses/license.txt
COPY --from=builder /workspace/hashicorp-golang-lru.tar.gz licenses/mpl_source/hashicorp-golang-lru.tar.gz
COPY --from=builder /workspace/armon-consul-api.tar.gz licenses/mpl_source/armon-consul-api.tar.gz
COPY --from=builder /workspace/hasicorp-hcl.tar.gz licenses/mpl_source/hasicorp-hcl.tar.gz
COPY --from=builder /workspace/*.tar.gz licenses/mpl_source/
COPY generated/admissionregistration.k8s.io_v1_validatingwebhookconfiguration_seldon-validating-webhook-configuration.yaml /tmp/operator-resources/validate.yaml
COPY generated/v1_service_seldon-webhook-service.yaml /tmp/operator-resources/service.yaml
COPY generated/v1_configmap_seldon-config.yaml /tmp/operator-resources/configmap.yaml
Expand Down
28 changes: 23 additions & 5 deletions operator/Dockerfile.redhat
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,29 @@ COPY client/ client/
RUN go build -a -o manager main.go

# Get MPL licensed dependencies
RUN wget -O hashicorp-golang-lru.tar.gz https://github.com/hashicorp/golang-lru/archive/master.tar.gz
RUN wget -O armon-consul-api.tar.gz https://github.com/armon/consul-api/archive/master.tar.gz
RUN wget -O hasicorp-hcl.tar.gz https://github.com/hashicorp/hcl/archive/hcl1.tar.gz
RUN wget -O go-sql-driver-mysql.tar.gz https://github.com/go-sql-driver/mysql/archive/master.tar.gz
RUN wget -O hashicorp-consul.tar.gz https://github.com/hashicorp/consul/archive/main.tar.gz
RUN wget -O hashicorp-errwrap.tar.gz https://github.com/hashicorp/errwrap/archive/master.tar.gz
RUN wget -O hashicorp-go-cleanhttp.tar.gz https://github.com/hashicorp/go-cleanhttp/archive/master.tar.gz
RUN wget -O hashicorp-go-immutable-radix.tar.gz https://github.com/hashicorp/go-immutable-radix/archive/master.tar.gz
RUN wget -O hashicorp-go-multierror.tar.gz https://github.com/hashicorp/go-multierror/archive/master.tar.gz
RUN wget -O hashicorp-go-plugin.tar.gz https://github.com/hashicorp/go-plugin/archive/master.tar.gz
RUN wget -O hashicorp-go-retryablehttp.tar.gz https://github.com/hashicorp/go-retryablehttp/archive/master.tar.gz
RUN wget -O hashicorp-go-rootcerts.tar.gz https://github.com/hashicorp/go-rootcerts/archive/master.tar.gz
RUN wget -O hashicorp-go-sockaddr.tar.gz https://github.com/hashicorp/go-sockaddr/archive/master.tar.gz
RUN wget -O hashicorp-go-uuid.tar.gz https://github.com/hashicorp/go-uuid/archive/master.tar.gz
RUN wget -O hashicorp-go-version.tar.gz https://github.com/hashicorp/go-version/archive/master.tar.gz
RUN wget -O hashicorp-golang-lru.tar.gz https://github.com/hashicorp/golang-lru/archive/master.tar.gz
RUN wget -O hashicorp-hcl.tar.gz https://github.com/hashicorp/hcl/archive/main.tar.gz
RUN wget -O hashicorp-logutils.tar.gz https://github.com/hashicorp/logutils/archive/master.tar.gz
RUN wget -O hashicorp-memberlist.tar.gz https://github.com/hashicorp/memberlist/archive/master.tar.gz
RUN wget -O hashicorp-serf.tar.gz https://github.com/hashicorp/serf/archive/master.tar.gz
RUN wget -O hashicorp-vault.tar.gz https://github.com/hashicorp/vault/archive/master.tar.gz
RUN wget -O hashicorp-yamux.tar.gz https://github.com/hashicorp/yamux/archive/master.tar.gz
RUN wget -O mitchellh-cli.tar.gz https://github.com/mitchellh/cli/archive/master.tar.gz
RUN wget -O mitchellh-gox.tar.gz https://github.com/mitchellh/gox/archive/master.tar.gz
RUN wget -O mozilla-tls-observatory.tar.gz https://github.com/mozilla/tls-observatory/archive/master.tar.gz

FROM registry.access.redhat.com/ubi8/ubi-minimal
LABEL name="Seldon Operator" \
Expand All @@ -36,9 +56,7 @@ LABEL name="Seldon Operator" \
WORKDIR /
COPY --from=builder /workspace/manager .
COPY licenses/license.txt licenses/license.txt
COPY --from=builder /workspace/hashicorp-golang-lru.tar.gz licenses/mpl_source/hashicorp-golang-lru.tar.gz
COPY --from=builder /workspace/armon-consul-api.tar.gz licenses/mpl_source/armon-consul-api.tar.gz
COPY --from=builder /workspace/hasicorp-hcl.tar.gz licenses/mpl_source/hasicorp-hcl.tar.gz
COPY --from=builder /workspace/*.tar.gz licenses/mpl_source/
COPY generated/admissionregistration.k8s.io_v1_validatingwebhookconfiguration_seldon-validating-webhook-configuration.yaml /tmp/operator-resources/validate.yaml
COPY generated/v1_service_seldon-webhook-service.yaml /tmp/operator-resources/service.yaml
COPY generated/v1_configmap_seldon-config.yaml /tmp/operator-resources/configmap.yaml
Expand Down
3 changes: 3 additions & 0 deletions wrappers/s2i/python/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ LABEL io.openshift.s2i.scripts-url="image:///s2i/bin"
ARG PYTHON_VERSION
ARG CONDA_VERSION

# MPL based licenses
RUN wget -O certifi-python-certifi.tar.gz https://github.com/certifi/python-certifi/archive/master.tar.gz

RUN conda install --yes python=$PYTHON_VERSION conda=$CONDA_VERSION
RUN dnf install -y make automake gcc gcc-c++

Expand Down
3 changes: 3 additions & 0 deletions wrappers/s2i/python/Dockerfile.conda
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ ENV PATH /opt/conda/bin:$PATH
RUN dnf update -y && \
dnf install -y wget bzip2 ca-certificates curl git

# MPL based licenses
RUN wget -O certifi-python-certifi.tar.gz https://github.com/certifi/python-certifi/archive/master.tar.gz

ARG CONDA_DOWNLOAD_VERSION
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-${CONDA_DOWNLOAD_VERSION}-Linux-x86_64.sh -O ~/miniconda.sh && \
/bin/bash ~/miniconda.sh -b -p /opt/conda && \
Expand Down
3 changes: 3 additions & 0 deletions wrappers/s2i/python/Dockerfile.gpu
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ RUN apt-get update -y && apt-get install -qy --no-install-recommends \

ENV PATH /opt/conda/bin:$PATH

# MPL based licenses
RUN wget -O certifi-python-certifi.tar.gz https://github.com/certifi/python-certifi/archive/master.tar.gz

# Install Miniconda3
ARG CONDA_DOWNLOAD_VERSION
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-${CONDA_DOWNLOAD_VERSION}-Linux-x86_64.sh -O ~/miniconda.sh && \
Expand Down

0 comments on commit 655b718

Please sign in to comment.