All Projects → guymers → containers_by_bazel

guymers / containers_by_bazel

Licence: Apache-2.0 license
Container images created with Bazel

Programming Languages

Starlark
911 projects
shell
77523 projects
Dockerfile
14818 projects
python
139335 projects - #7 most used programming language
javascript
184084 projects - #8 most used programming language
scala
5932 projects

Projects that are alternatives of or similar to containers by bazel

sbt-bazel
Easily convert SBT projects to Bazel workspaces
Stars: ✭ 55 (+71.88%)
Mutual labels:  bazel
copr-build-bazel
copr build of bazel | https://copr.fedorainfracloud.org/coprs/vbatts/bazel/
Stars: ✭ 14 (-56.25%)
Mutual labels:  bazel
cryostat
Secure JDK Flight Recorder management for containerized JVMs
Stars: ✭ 147 (+359.38%)
Mutual labels:  oci
boot2podman
Lightweight Linux for Podman
Stars: ✭ 86 (+168.75%)
Mutual labels:  oci
nix2container
An archive-less dockerTools.buildImage implementation
Stars: ✭ 133 (+315.63%)
Mutual labels:  oci
AlphaZero-Renju
No description or website provided.
Stars: ✭ 17 (-46.87%)
Mutual labels:  bazel
eclipse
Eclipse For Bazel (deprecated, see https://github.com/salesforce/bazel-eclipse instead)
Stars: ✭ 31 (-3.12%)
Mutual labels:  bazel
rules elm
Bazel rules for building web applications written in Elm
Stars: ✭ 22 (-31.25%)
Mutual labels:  bazel
essex
Essex - Boilerplate for Docker Based Projects
Stars: ✭ 32 (+0%)
Mutual labels:  oci
FibDotNet
Build container images for your .NET applications.
Stars: ✭ 17 (-46.87%)
Mutual labels:  oci
inclavare-containers
A novel container runtime, aka confidential container, for cloud-native confidential computing and enclave runtime ecosystem.
Stars: ✭ 510 (+1493.75%)
Mutual labels:  oci
oci-quickstart
Oracle Cloud Infrastructure Quick Start
Stars: ✭ 59 (+84.38%)
Mutual labels:  oci
vim-ft-bzl
No description or website provided.
Stars: ✭ 26 (-18.75%)
Mutual labels:  bazel
vim-bazel
Vim support for Bazel
Stars: ✭ 118 (+268.75%)
Mutual labels:  bazel
toktok-stack
A snapshot of the complete software stack (excluding some external libraries and programs)
Stars: ✭ 12 (-62.5%)
Mutual labels:  bazel
vim-bazel
Trigger bazel from vim and load errors into the quickfix list
Stars: ✭ 15 (-53.12%)
Mutual labels:  bazel
oci-cloudera
Terraform module to deploy Cloudera on Oracle Cloud Infrastructure (OCI)
Stars: ✭ 20 (-37.5%)
Mutual labels:  oci
terraform-oci-vcn
A reusable and extensible Terraform module that provisions a VCN on Oracle Cloud Infrastructure
Stars: ✭ 22 (-31.25%)
Mutual labels:  oci
rules helm
rules_helm: Bazel rules for managing helm charts
Stars: ✭ 46 (+43.75%)
Mutual labels:  bazel
buildkube
Bazel Remote Cache + Remote Execution in Kubernetes
Stars: ✭ 60 (+87.5%)
Mutual labels:  bazel

Container images built using Bazel. Benefits include reproducibility, rebuild speed, composability.

To use as a base

Choose a commit and add the below to your WORKSPACE file:

git_repository(
  name = "containers_by_bazel",
  remote = "https://github.com/guymers/containers_by_bazel.git",
  commit = "<commit-id>",
)

load("//scripts:repositories.bzl", "dependency_repositories")
dependency_repositories()

load("@bazel_rules_container_test//container:repositories.bzl", container_test_repositories = "repositories")
container_test_repositories()

load("@io_bazel_rules_docker//repositories:repositories.bzl", docker_rules_repositories = "repositories")
docker_rules_repositories()

load("@io_bazel_rules_docker//repositories:deps.bzl", docker_rules_deps = "deps")
docker_rules_deps()

Using containers

Create a BUILD file and use the name of the git repository prefixed with a @.

container_image(
  name = "jenkins_with_plugins",
  base = "@containers_by_bazel//jenkins",
  ...
)

Custom Debian dependencies

Create a BUILD file with the contents:

load("@containers_by_bazel//scripts/debian:dependencies.bzl", "dependencies")

dependencies(
  name = "",
  dependencies = glob(["dependencies/*"]),
  target_prefix = "@containers_by_bazel"
)

Where the dependencies folder contains files in the format of the ones in scripts/debian/dependencies/

Then you'll need to pretty much copy scripts/update_dependencies.sh

To use as is

To create containers

You can use the ./build_container script. It ensures that you cannot override the same tag with a different image.

bazel build //scripts/versions
source ./bazel-bin/scripts/versions/versions.sh
./scripts/build_container.sh //cassandra cassandra ${CASSANDRA_VERSION}
./scripts/build_container.sh //dnsmasq dnsmasq ${DNSMASQ_VERSION}
./scripts/build_container.sh //gerrit gerrit ${GERRIT_VERSION}
./scripts/build_container.sh //grafana grafana ${GRAFANA_VERSION}
./scripts/build_container.sh //java:zulu zulu ${JAVA_VERSION}
./scripts/build_container.sh //jenkins jenkins ${JENKINS_VERSION}
./scripts/build_container.sh //jenkins:agent jenkins-agent ${JENKINS_SWARM_VERSION}
./scripts/build_container.sh //kafka kafka ${KAFKA_VERSION}
./scripts/build_container.sh //nginx nginx ${NGINX_VERSION}
./scripts/build_container.sh //nodejs nodejs ${NODEJS_VERSION}
./scripts/build_container.sh //php php ${PHP_VERSION}
./scripts/build_container.sh //postgresql postgresql ${POSTGRESQL_VERSION}
./scripts/build_container.sh //postgresql:postgis postgis ${POSTGRESQL_VERSION}-${POSTGIS_VERSION}
./scripts/build_container.sh //prometheus prometheus ${PROMETHEUS_VERSION}
./scripts/build_container.sh //rabbitmq rabbitmq ${RABBITMQ_VERSION}
./scripts/build_container.sh //redis redis ${REDIS_VERSION}
./scripts/build_container.sh //sbt sbt ${SBT_VERSION}
./scripts/build_container.sh //zipkin zipkin ${ZIPKIN_VERSION}
./scripts/build_container.sh //zookeeper zookeeper ${ZOOKEEPER_VERSION}

To test:

bazel test //test/...

To update dependencies

Create the docker containers to pull dependency versions from:

DOCKER_NO_CACHE=true ./scripts/docker/create.sh

Update dependencies in files:

./scripts/update_dependencies.sh

Users

911 nexus
912 jenkins
913 tomcat
915 zipkin
916 cassandra
917 elasticsearch
918 kafka
919 zookeeper
921 prometheus
922 grafana
923 kibana
929 envoy
930 nginx
931 redis
938 ejabberd
939 rabbitmq
941 postgres
951 gerrit
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].