Skip to content

Commit

Permalink
ubi image
Browse files Browse the repository at this point in the history
  • Loading branch information
jantomgid committed Jul 12, 2024
1 parent b795e15 commit b3a9f2e
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 6 deletions.
28 changes: 24 additions & 4 deletions Dockerfile.ci
Original file line number Diff line number Diff line change
@@ -1,16 +1,36 @@
FROM alpine:3.19
FROM registry.access.redhat.com/ubi9/ubi-minimal:latest

ENV UID=1000 \
GID=1000

RUN apk add --no-cache ffmpeg su-exec ca-certificates bash jq curl yq olm
RUN rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm

# Install dependencies using microdnf
RUN microdnf install -y \
shadow-utils \
ca-certificates \
bash \
jq \
yq \
libolm \
curl \
&& microdnf clean all

# ffmpeg \
# yq \
# olm \
# curl \

RUN curl -sSL https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -o /usr/bin/yq && chmod +x /usr/bin/yq

ARG EXECUTABLE=./mautrix-imessage
COPY $EXECUTABLE /usr/bin/mautrix-imessage
COPY ./example-config.yaml /opt/mautrix-imessage/example-config.yaml
COPY ./docker-run.sh /docker-run.sh
VOLUME /data

RUN ldd /usr/bin/mautrix-imessage
# Ensure the entrypoint script is executable
RUN chmod +x /docker-run.sh /usr/bin/mautrix-imessage

VOLUME /data

CMD ["/docker-run.sh"]
5 changes: 3 additions & 2 deletions docker-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,6 @@ fi

cd /data
fixperms
su-exec $UID:$GID id
exec su-exec $UID:$GID /usr/bin/mautrix-imessage
chroot --userspec=$UID:$GID / id
#exec su-exec $UID:$GID /usr/bin/mautrix-imessage
exec chroot --userspec=$UID:$GID / /usr/bin/mautrix-imessage

0 comments on commit b3a9f2e

Please sign in to comment.