diff --git a/Makefile b/Makefile deleted file mode 100644 index 43a8e1a12..000000000 --- a/Makefile +++ /dev/null @@ -1,97 +0,0 @@ -NAMESPACE ?= puppet -git_describe = $(shell git describe) -vcs_ref := $(shell git rev-parse HEAD) -build_date := $(shell date -u +%FT%T) -hadolint_available := $(shell hadolint --help > /dev/null 2>&1; echo $$?) -hadolint_command := hadolint -hadolint_container := ghcr.io/hadolint/hadolint:latest - -export BUNDLE_PATH = $(PWD)/.bundle/gems -export BUNDLE_BIN = $(PWD)/.bundle/bin -export GEMFILE = $(PWD)/Gemfile -export DOCKER_BUILDKIT ?= 1 -PUPPERWARE_ANALYTICS_STREAM ?= dev - -ifeq ($(IS_RELEASE),true) - VERSION ?= $(shell echo $(git_describe) | sed 's/-.*//') - PRODUCT ?= puppetserver - # to work around failures that occur between when the repo is tagged and when the package - # is actually shipped, see if this version exists in dujour - PUBLISHED_VERSION ?= $(shell curl --silent 'https://updates.puppetlabs.com/?product=$(PRODUCT)&version=$(VERSION)' | jq '."version"' | tr -d '"') - # For our containers built from packages, we want those to be built once then never changed - # so check to see if that container already exists on dockerhub - CONTAINER_EXISTS = $(shell DOCKER_CLI_EXPERIMENTAL=enabled docker manifest inspect $(NAMESPACE)/puppetserver:$(VERSION) > /dev/null 2>&1; echo $$?) -ifeq ($(CONTAINER_EXISTS),0) - SKIP_BUILD ?= true -else ifneq ($(VERSION),$(PUBLISHED_VERSION)) - SKIP_BUILD ?= true -endif - - BUILD_TYPE ?= release - LATEST_VERSION ?= latest -else - BUILD_TYPE ?= edge - VERSION ?= edge - IS_LATEST := false -endif - -prep: - @git fetch --unshallow ||: - @git fetch origin 'refs/tags/*:refs/tags/*' -ifeq ($(SKIP_BUILD),true) - @echo "SKIP_BUILD is true, exiting with 1" - @exit 1 -endif - -lint: -ifeq ($(hadolint_available),0) - @$(hadolint_command) puppetserver/Dockerfile -else - @docker pull $(hadolint_container) - @docker run --rm -v $(PWD)/puppetserver/Dockerfile:/Dockerfile \ - -i $(hadolint_container) $(hadolint_command) Dockerfile -endif - -build: prep - docker buildx build \ - ${DOCKER_BUILD_FLAGS} \ - --load \ - --pull \ - --build-arg build_type=$(BUILD_TYPE) \ - --build-arg vcs_ref=$(vcs_ref) \ - --build-arg build_date=$(build_date) \ - --build-arg version=$(VERSION) \ - --build-arg pupperware_analytics_stream=$(PUPPERWARE_ANALYTICS_STREAM) \ - --file puppetserver/Dockerfile \ - --tag $(NAMESPACE)/puppetserver:$(VERSION) $(PWD)/.. -ifeq ($(IS_LATEST),true) - @docker tag $(NAMESPACE)/puppetserver:$(VERSION) \ - $(NAMESPACE)/puppetserver:$(LATEST_VERSION) -endif - -test: prep - @bundle install --path $$BUNDLE_PATH --gemfile $$GEMFILE --with test - @bundle update - @PUPPET_TEST_DOCKER_IMAGE=$(NAMESPACE)/puppetserver:$(VERSION) \ - bundle exec --gemfile $$GEMFILE \ - rspec --options puppetserver/.rspec spec - -push-image: prep - @docker push puppet/puppetserver:$(VERSION) -ifeq ($(IS_LATEST),true) - @docker push puppet/puppetserver:$(LATEST_VERSION) -endif - -push-readme: - @docker pull sheogorath/readme-to-dockerhub - @docker run --rm \ - -v $(PWD)/puppetserver/README.md:/data/README.md \ - -e DOCKERHUB_USERNAME="$(DOCKERHUB_USERNAME)" \ - -e DOCKERHUB_PASSWORD="$(DOCKERHUB_PASSWORD)" \ - -e DOCKERHUB_REPO_PREFIX=puppet \ - -e DOCKERHUB_REPO_NAME=puppetserver \ - sheogorath/readme-to-dockerhub - -publish: push-image push-readme - -.PHONY: prep lint build test publish push-image push-readme diff --git a/README.md b/README.md index c957b8b6d..1d3c4f396 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -# Docker image for Puppet Server +# Container image for Puppet Server -See the Makefile targets for building and publishing the image. -See the image directory for information on running the image. +[![Sponsored by betadots GmbH](https://img.shields.io/badge/Sponsored%20by-betadots%20GmbH-blue.svg)](https://www.betadots.de) +For compose file see: [CRAFTY](https://github.com/voxpupuli/crafty) diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index 3570eeaa0..000000000 --- a/docker-compose.yml +++ /dev/null @@ -1,28 +0,0 @@ -version: '3.5' - -services: - puppet: - hostname: puppet - image: ${PUPPET_TEST_DOCKER_IMAGE:-puppet/puppetserver} - expose: - - 8141 - environment: - - PUPPETSERVER_HOSTNAME=puppet - - PUPPET_MASTERPORT=8141 - - PUPPERWARE_ANALYTICS_ENABLED=${PUPPERWARE_ANALYTICS_ENABLED:-false} - - USE_PUPPETDB=false - - compiler: - hostname: compiler - image: ${PUPPET_TEST_DOCKER_IMAGE:-puppet/puppetserver} - environment: - - PUPPERWARE_ANALYTICS_ENABLED=${PUPPERWARE_ANALYTICS_ENABLED:-false} - - PUPPETSERVER_HOSTNAME=compiler - - CA_ENABLED=false - - CA_HOSTNAME=puppet - - CA_MASTERPORT=8141 - - USE_PUPPETDB=false - -networks: - default: - name: puppetserver_test diff --git a/ruby-docker-copy-patch.rb b/ruby-docker-copy-patch.rb deleted file mode 100644 index 4d63da68e..000000000 --- a/ruby-docker-copy-patch.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -require "fileutils" - -# Fixes a linux 5.6 - 5.10 kernel bug around copy_file_range syscall -# https://github.com/docker/for-linux/issues/1015 - -module FileUtils - class Entry_ - def copy_file(dest) - File.open(path) do |s| - File.open(dest, 'wb', s.stat.mode) do |d| - s.chmod s.lstat.mode - IO.copy_stream(s, d) - d.chmod(d.lstat.mode) - end - end - end - end -end