Skip to content

Commit

Permalink
feat: wip Dockerfile for just Nouveau
Browse files Browse the repository at this point in the history
  • Loading branch information
janl committed Jun 18, 2024
1 parent 58910ed commit a2135f7
Show file tree
Hide file tree
Showing 2 changed files with 107 additions and 0 deletions.
80 changes: 80 additions & 0 deletions 3.4.0-nouveau/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.

FROM debian:bullseye-slim

LABEL maintainer="CouchDB Developers [email protected]"

# Add CouchDB user account to make sure the IDs are assigned consistently
RUN groupadd -g 5984 -r nouveau && useradd -u 5984 -d /opt/nouveau -g nouveau nouveau

# be sure GPG and apt-transport-https are available and functional
RUN set -ex; \
apt-get update; \
apt-get install -y --no-install-recommends \
apt-transport-https \
ca-certificates \
dirmngr \
gnupg \
; \
rm -rf /var/lib/apt/lists/*

# grab tini for signal handling and zombie reaping
# see https://github.com/apache/couchdb-docker/pull/28#discussion_r141112407
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends tini; \
rm -rf /var/lib/apt/lists/*; \
tini --version

# http://docs.couchdb.org/en/latest/install/unix.html#installing-the-apache-couchdb-packages
ENV GPG_COUCH_KEY \
# gpg: rsa8192 205-01-19 The Apache Software Foundation (Package repository signing key) <[email protected]>
390EF70BB1EA12B2773962950EE62FB37A00258D
#RUN set -eux; \
# apt-get update; \
# apt-get install -y curl; \
# export GNUPGHOME="$(mktemp -d)"; \
# curl -fL -o keys.asc https://couchdb.apache.org/repo/keys.asc; \
# gpg --batch --import keys.asc; \
# gpg --batch --export "${GPG_COUCH_KEY}" > /usr/share/keyrings/couchdb-archive-keyring.gpg; \
# command -v gpgconf && gpgconf --kill all || :; \
# rm -rf "$GNUPGHOME"; \
# apt-key list; \
# apt purge -y --autoremove curl; \
# rm -rf /var/lib/apt/lists/*

# until the .deb is available on jFrog, get it from here and place it next to the Dockerfile
# https://clients.neighbourhood.ie/couchdb/couchdb-nouveau_3.3.3-022ffd1~debian-bookworm_amd64.deb
COPY --chown=nouveau:nouveau couchdb-nouveau_3.3.3-022ffd1~debian-bookworm_amd64.deb /root/couchdb-nouveau_3.3.3-022ffd1~debian-bookworm_amd64.deb

#RUN . /etc/os-release; \
# echo "deb [signed-by=/usr/share/keyrings/couchdb-archive-keyring.gpg] https://apache.jfrog.io/artifactory/couchdb-deb/ ${VERSION_CODENAME} main" | \
# tee /etc/apt/sources.list.d/couchdb.list >/dev/null

# https://github.com/apache/couchdb-pkg/blob/master/debian/README.Debian
RUN set -eux; \
apt-get update; \
\
echo "couchdb-nouveau couchdb-nouveau/enable select false" | debconf-set-selections; \
DEBIAN_FRONTEND=noninteractive apt-get install -y --allow-downgrades --allow-remove-essential --allow-change-held-packages \
/root/couchdb-nouveau_3.3.3-022ffd1~debian-bookworm_amd64.deb;


COPY --chown=nouveau:nouveau nouveau.yaml /opt/nouveau/etc/nouveau.yaml

VOLUME /opt/nouveau/data

# 5987: Nouveau App
# 5988: Nouveau Admin
EXPOSE 5987 5988
CMD ["tini", "/opt/nouveau/bin/nouveau", "server", "/opt/nouveau/etc/nouveau.yaml"]
27 changes: 27 additions & 0 deletions 3.4.0-nouveau/nouveau.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
maxIndexesOpen: 3000
commitIntervalSeconds: 30
idleSeconds: 60
rootDir: ./data/nouveau

logging:
level: INFO

server:
applicationConnectors:
- type: http
bindHost: 0.0.0.0
port: 5987
useDateHeader: false
adminConnectors:
- type: http
bindHost: 0.0.0.0
port: 5988
useDateHeader: false
gzip:
includedMethods:
- GET
- POST
requestLog:
appenders:
- type: console
target: stderr

0 comments on commit a2135f7

Please sign in to comment.