DockerBase.java 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
  3. * or more contributor license agreements. Licensed under the Elastic License
  4. * 2.0 and the Server Side Public License, v 1; you may not use this file except
  5. * in compliance with, at your election, the Elastic License 2.0 or the Server
  6. * Side Public License, v 1.
  7. */
  8. package org.elasticsearch.gradle.internal;
  9. /**
  10. * This class models the different Docker base images that are used to build Docker distributions of Elasticsearch.
  11. */
  12. public enum DockerBase {
  13. CENTOS("centos:8", ""),
  14. // "latest" here is intentional, since the image name specifies "8"
  15. UBI("docker.elastic.co/ubi8/ubi-minimal:latest", "-ubi8"),
  16. // The Iron Bank base image is UBI (albeit hardened), but we are required to parameterize the Docker build
  17. IRON_BANK("${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG}", "-ironbank");
  18. private final String image;
  19. private final String suffix;
  20. DockerBase(String image, String suffix) {
  21. this.image = image;
  22. this.suffix = suffix;
  23. }
  24. public String getImage() {
  25. return image;
  26. }
  27. public String getSuffix() {
  28. return suffix;
  29. }
  30. }