diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..b72d9890bec861eded11a6092160c33c117720d0 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +musl-1.2.0.tar.gz diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..f8e5c9f7ee9938d1896e87776eb79b8e9226606a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,42 @@ +ARG BASE_REGISTRY=registry1.dsop.io +ARG BASE_IMAGE=ironbank/redhat/ubi/ubi8 +ARG BASE_TAG=8.2 +FROM ${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG} as build +USER 0 +RUN dnf install go wget make cmake gcc -y && \ + dnf upgrade -y && \ + dnf clean all && \ + rm -rf /var/cache/dnf +WORKDIR /opt +COPY musl-1.2.0.tar.gz . +RUN mkdir -p /usr/local/src/musl && \ + tar -zxf /opt/musl-1.2.0.tar.gz -C /usr/local/src/musl --strip-components=1 +WORKDIR /usr/local/src/musl +RUN ./configure && \ + make && \ + make install && \ + rm -f /opt/musl-1.2.0.tar.gz +FROM kubeflow-images-public/katib/suggestion-random:latest as base +#FROM gcr.io/kubeflow-images-public/katib/suggestion-random@sha256:898462ec4f1ad8a857a3c5d867788b2d042d7cebd8c2c2f040fab0966758b416 as base +FROM ${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG} +LABEL org.opencontainers.image.title="Katib-suggestion-random" \ + org.opencontainers.image.description="Suggestion Random Service Engine" \ + org.opencontainers.image.licenses="Apache-2.0" \ + org.opencontainers.image.url="gcr.io/kubeflow-images-public/katib/suggestion-random@sha256:898462ec4f1ad8a857a3c5d867788b2d042d7cebd8c2c2f040fab0966758b416" \ + org.opencontainers.image.version="latest" \ + maintainer="cvernooy@oteemo.com" +RUN dnf upgrade -y && \ + dnf clean all && \ + rm -rf /var/cache/dnf +USER 0 +COPY --from=build /usr/local/musl/lib/libc.so /usr/local/musl/lib/libc.so +COPY --from=build /lib/ld-musl-x86_64.so.1 /lib/ld-musl-x86_64.so.1 +COPY --from=base /app /app +RUN find / -path /proc -prune -o -perm /4000 -exec chmod u-s {} \; +RUN find / -path /proc -prune -o -perm /2000 -exec chmod g-s {} \; +RUN groupadd -r sugg-random && useradd -r -g sugg-random sugg-random +RUN chown -R sugg-random. /app +RUN chmod +x /app/random +WORKDIR /app +USER sugg-random +ENTRYPOINT ["./random"] diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000000000000000000000000000000000000..01432650a81255cc1886d8dbc92884ad03d250ef --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,2 @@ +@Library('DCCSCR@master') _ +dccscrPipeline(version: "898462ec4f1a") diff --git a/README.md b/README.md index 1dd0df9c3a02f811d87ca85c634f7d312ce95acf..1c21a2b4aa88550e6f8bb51bd99845d7d828315f 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,3 @@ -# suggestion-random-2019 +# metrics-collector-2019 +## \ No newline at end of file diff --git a/download.yaml b/download.yaml new file mode 100644 index 0000000000000000000000000000000000000000..d63f1f513c887acabefac10d437e57efb7e1cf49 --- /dev/null +++ b/download.yaml @@ -0,0 +1,8 @@ +resources: + - url: "docker://gcr.io/kubeflow-images-public/katib/suggestion-random@sha256:898462ec4f1ad8a857a3c5d867788b2d042d7cebd8c2c2f040fab0966758b416" + tag: "kubeflow-images-public/katib/suggestion-random:latest" + - url: "https://musl.libc.org/releases/musl-1.2.0.tar.gz" + filename: musl-1.2.0.tar.gz + validation: + type: sha256 + value: c6de7b191139142d3f9a7b5b702c9cae1b5ee6e7f57e582da9328629408fd4e8 \ No newline at end of file