Skip to content

Dockerfile based on the RedHat UBI #146

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

Closed
wants to merge 4 commits into from
Closed

Dockerfile based on the RedHat UBI #146

wants to merge 4 commits into from

Conversation

willholley
Copy link
Member

@willholley willholley commented May 10, 2019

Overview

This is a port of the existing debian-based Dockerfile to the recently announced RedHat Universal Base Image, which allows 3rd parties to distribute RHEL-derived containers. Mostly this was just an experiment to see whether a port was straightforward (given IBM's obvious interest in making sure CouchDB plays nicely in that environment), but if there's interest in publishing it alongside the existing CouchDB Docker images, I will continue to work on it and see how much it can be slimmed down / simplified.

Testing recommendations

To build from within the 2.3.1 directory:

docker build 2.3.1-ubi7 -t couchdb:2.3.1-ubi7
docker run -d -p 5984:5984 couchdb:2.3.1-ubi7

Checklist

  • Code is written and works correctly;
  • Changes are covered by tests;
  • Documentation reflects the changes;

Installs CouchDB 2.3.1 via the official rpm.

To build:
```
$ cd 2.3.1
$ docker build . -f ubi7/Dockerfile
```
@wohali
Copy link
Member

wohali commented May 10, 2019

Hi Will!

Thanks for the port.

I don't personally want to have to maintain 2x Dockerfiles per release like this, nor do I want to change the default distribution to a RH-derived one, but if you're signing up to perpetually support this style of Dockerfile for the future for every release, you have my +1.

(Note: I'm saying that if you sign up for maintaining this, this could live at Docker Hub's apache/couchdb:x.x.x-ubi7 tag, but not in the "official" downstream CouchDB image (what you get from docker pull couchdb) . )

On the TODOs:

  • ASF policy prevents us from using Travis to autopublish binaries, so that's not going to happen. See: Build docker image on push to master #4, Have an automated build for the dev Dockerfile #44, etc. Right now, on major release, I run the instructions in README.md to build & push the apache/couchdb images, and that's really straightforward and not much work. A convenience build.sh or Makefile that helps with this is a nice to have, but really not a huge problem. It'd be trivial to adapt the build.sh over in apache/couchdb-ci for this purpose.
  • The issue with GPG signing is related to getting an appropriate key into Bintray, with which I've had trouble previously, esp. without breaking CentOS 6. Reach out to me via email (wohali@apache dot org) if you want to try and help me diagnose this.

@@ -0,0 +1,6 @@
[bintray-apache-couchdb-rpm]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is going to land, please move this to the ubi7/ directory. If it's going to be shared across multiple releases, that could be a new top-level directory if you wanted.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @wohali - this is done with the latest commit. The slightly awkward thing (as per the first commit) is that the docker context needs to be the 2.3.1 directory rather than the directory containing the Dockerfile, as Docker doesn't allow importing files from a parent directory.

@wohali
Copy link
Member

wohali commented May 15, 2019 via email

Move the ubi-based Dockerfile into its own top level
folder, similar to the couchperuser variant. This makes integration
with existing build scripts/processes simpler though means a bit
of duplication of config files between the different base images.
@willholley
Copy link
Member Author

willholley commented May 17, 2019

I don't personally want to have to maintain 2x Dockerfiles per release like this, nor do I want to change the default distribution to a RH-derived one, but if you're signing up to perpetually support this style of Dockerfile for the future for every release, you have my +1.

Sure - I'm happy to be responsible for this for the foreseeable future.

I've re-jigged the directory structure so that building the ubi image is the same as for the other Dockerfiles (similar to the couch-per-user variant). I also investigated using the ubi-minimal image as a base but quickly concluded it's going to take a lot of work to build up the dependencies we require, so parking that for now.

I think this is good to go, pending the GPG issue.

@willholley willholley changed the title WIP: Dockerfile based on the RedHat UBI Dockerfile based on the RedHat UBI Jul 1, 2019
@welshDoug welshDoug mentioned this pull request Aug 12, 2019
@willholley
Copy link
Member Author

closing in favour of #150

@willholley willholley closed this Aug 12, 2019
@willholley willholley deleted the ubi branch August 12, 2019 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants