Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
elig Merge pull request #6 from amithins/master
Create a base image for router with its user
Latest commit 89caa81 Jun 12, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
base
cacerts First public commit Apr 11, 2019
cc First public commit Apr 11, 2019
customize-example Added example for RedHat Universal Base Image Jun 4, 2019
docker-bazel-builder First public commit Apr 11, 2019
experimental First public commit Apr 11, 2019
hack First public commit Apr 11, 2019
java
package_manager First public commit Apr 11, 2019
.bazelrc First public commit Apr 11, 2019
.gitignore First public commit Apr 11, 2019
BUILD Create a base image for router with its user Jun 11, 2019
LICENSE Initial commit Apr 11, 2019
README.md Add details on ability to use the examples for customising Artifactor… Apr 23, 2019
WORKSPACE DOPS-2248 Fix NPE by adding missing packages May 7, 2019
publish.sh First public commit Apr 11, 2019

README.md

JFrog distroless base images

This project is based on Google distroless project and build using Bazel build tool

Goal

Create a light weight image with no security vulnerabilities

Build Image

To build all images run the following in the root directory, it expect BUILD_NUMBER (Jenkins Ready) to be pre set.

# Set BUILD_NUMBER for local use
export BUILD_NUMBER=0.1-test

# Run the bazel build
bazel build all

If you want to build specific image you can run

bazel build base/base

To tag the images like stated in the root BUILD file run

bazel run all

If you don't have bazel installed you can use the docker bazel builder image by

# CD into the Dockerfile directory
cd docker-bazel-builder

# Build the Docker image
docker build -f Dockerfile.bazel-builder -t bazel-docker-builder:latest .

# Go back to repository root
cd ../

# Run the bazel build
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v "$PWD":/usr/src/app -e BUILD_NUMBER=11 bazel-docker-builder:latest bash -c "bazel build all && bazel test --test_output=errors --curses=no //..."

Installed Resources

To install new debian you need to declare it in the WORKSPACE in the dpkg_list and in the BUILD file in the debs section of the image.

  • Resources that are not available as deb files can be installed as tar files. The download resource is define as http_archive in the WORKSPACE file and you build them under experimental directory, last command should tar it then you can add them as tar action during the image build.

Custom Artifactory Docker image

In some cases, you'll want to customise the Artifactory Docker image and add more tools or do some other customisations to it.
See customize-example directory with a couple of Dockerfiles as examples of how this can be done.

NOTE: These are examples only and are meant to be extended as needed!

You can’t perform that action at this time.