Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

control-service: job-builder-secure using kaniko fix #2447

Merged
merged 1 commit into from
Jul 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 2 additions & 28 deletions projects/control-service/projects/job-builder-secure/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,32 +1,6 @@
# Used to trigger a build for a data job image.

FROM gcr.io/kaniko-project/executor

FROM alpine

COPY --from=0 /kaniko /kaniko


ENV PATH $PATH:/kaniko
ENV SSL_CERT_DIR=/kaniko/ssl/certs
ENV DOCKER_CONFIG /kaniko/.docker/

WORKDIR /workspace
FROM versatiledatakit/job-builder:latest

# overwrite the Dockerfile used to build VDK jobs with our own with extra security hardening.
COPY Dockerfile.python.vdk /workspace/Dockerfile
COPY build_image.sh /build_image.sh
RUN chmod +x /build_image.sh


# Setup Python and Git
## Update & Install dependencies
RUN apk add --no-cache --update \
git \
bash

RUN apk add --update --no-cache python3=3.10.10-r0 py3-pip \
&& pip3 install awscli \
&& apk --purge -v del py3-pip \
&& rm -rf /var/cache/apk/*

ENTRYPOINT ["/build_image.sh"]
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
# Secure Job Builder
This package provides a way to configure and build your own Data Job images.

Secure Job Builder extends [the standard job-builder ](../job-builder/README.md) and
provides a secure environment for the execution of data jobs in Python.

It uses a [secure base Python image](versatiledatakit/data-job-base-python-3.10-secure:latest),
creates a non-root user to perform tasks, remove execution permissions on data job files.
It also removes several system executables and pip, minimizing the attack surface within the container.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1.3
1.2.0