Skip to content

use central script to create user in all containers #162

Description

@rwaffen

instead of adding and setting the openvox/puppet user in each container and hope to hit the smae defaults, why not make it a central implementation?

we could create a base image, or put a script in a repo and used it in all containers.

Base images could look like this: https://github.com/rwaffen/container-base/blob/main/Containerfile.alpine

or usage of a central script could look like this:

FROM docker.io/alpine:3.24 AS prepare

ENV \
    OPENVOX_GID=64604 \
    OPENVOX_UID=64604 \
    OPENVOX_USER_NAME=puppet \
    OPENVOX_GROUP_NAME=puppet \
    OPENVOX_USER_HOME=/opt/puppetlabs/server/data/puppetserver \
    OPENVOX_USER_SHELL=/sbin/nologin

RUN apk update && apk add --no-cache bash curl && \
    curl -sL https://raw.githubusercontent.com/rwaffen/container-base/refs/heads/main/prepare.sh | bash -

i think the base container would be the cleanest approach. but thought maybe have an alternative to this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions