fix: install perl-lockfile-simple from edge repository

This commit is contained in:
Markus Pesch 2024-03-02 14:31:59 +01:00
parent 444d4a63f4
commit 7974b3fb4b
Signed by: volker.raschek
GPG Key ID: 852BCC170D81A982
2 changed files with 35 additions and 15 deletions

View File

@ -1,13 +1,28 @@
FROM docker.io/library/alpine:3.18.5
RUN echo "http://dl-3.alpinelinux.org/alpine/edge/testing/" >> /etc/apk/repositories
RUN apk upgrade
RUN apk add --update perl perl-lockfile-simple perl-dbi perl-dbd-pg perl-dbd-mysql fetchmail
# The file /etc/apk/repositories contains a list of the apk repositories. By
# default contains this file a list of the stable repositories pointing to the
# alpine version.
#
# Some perl packages are not part of the stable repositories. For this reason
# are the repositories switched to edge to access directly the latest versions
# of this apk packages.
#
# Using stable and edge at the same time is not allowed. For more information,
# take a look into the documentation of the edge repository.
#
# https://wiki.alpinelinux.org/wiki/Repositories#Edge
RUN echo "https://dl-cdn.alpinelinux.org/alpine/edge/main" > /etc/apk/repositories
RUN echo "https://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories
# Install packages
RUN apk upgrade && \
apk add --update perl perl-lockfile-simple perl-dbi perl-dbd-pg perl-dbd-mysql fetchmail
RUN mkdir --parents /run/fetchmail
COPY --chown=fetchmail:fetchmail fetchmail.pl /usr/local/bin/fetchmail.pl
USER fetchmail
ENTRYPOINT [ "/usr/bin/perl" ]
CMD [ "/usr/local/bin/fetchmail.pl" ]

View File

@ -1,7 +1,6 @@
# CONTAINER_RUNTIME
# The CONTAINER_RUNTIME variable will be used to specified the path to a
# container runtime. This is needed to start and run a container image.
CONTAINER_RUNTIME?=$(shell which podman)
# PODMAN_BIN's and tools
PODMAN_BIN?=$(shell which podman)
SKOPEO_BIN?=$(shell which skopeo)
# FETCHMAIL_IMAGE_REGISTRY_NAME
# Defines the name of the new container to be built using several variables.
@ -12,33 +11,39 @@ FETCHMAIL_IMAGE_NAMESPACE?=${FETCHMAIL_IMAGE_REGISTRY_USER}
FETCHMAIL_IMAGE_NAME:=postfixadmin-fetchmail
FETCHMAIL_IMAGE_VERSION?=latest
FETCHMAIL_IMAGE_FULLY_QUALIFIED=${FETCHMAIL_IMAGE_REGISTRY_NAME}/${FETCHMAIL_IMAGE_NAMESPACE}/${FETCHMAIL_IMAGE_NAME}:${FETCHMAIL_IMAGE_VERSION}
FETCHMAIL_IMAGE_UNQUALIFIED=${FETCHMAIL_IMAGE_NAMESPACE}/${FETCHMAIL_IMAGE_NAME}:${FETCHMAIL_IMAGE_VERSION}
# BUILD CONTAINER IMAGE
# ==============================================================================
PHONY:=container-image/build
container-image/build:
${CONTAINER_RUNTIME} build \
${PODMAN_BIN} build \
--file Dockerfile \
--no-cache \
--pull \
--tag ${FETCHMAIL_IMAGE_FULLY_QUALIFIED} \
--tag ${FETCHMAIL_IMAGE_UNQUALIFIED} \
.
# DELETE CONTAINER IMAGE
# ==============================================================================
PHONY:=container-image/delete
container-image/delete:
- ${CONTAINER_RUNTIME} image rm ${FETCHMAIL_IMAGE_FULLY_QUALIFIED} ${FETCHMAIL_IMAGE_UNQUALIFIED}
- ${CONTAINER_RUNTIME} image rm ${BASE_IMAGE_FULL}
- ${PODMAN_BIN} image rm ${FETCHMAIL_IMAGE_FULLY_QUALIFIED}
- ${PODMAN_BIN} image rm ${BASE_IMAGE_FULL}
# PUSH CONTAINER IMAGE
# ==============================================================================
PHONY+=container-image/push
container-image/push:
echo ${FETCHMAIL_IMAGE_REGISTRY_PASSWORD} | ${CONTAINER_RUNTIME} login ${FETCHMAIL_IMAGE_REGISTRY_NAME} --username ${FETCHMAIL_IMAGE_REGISTRY_USER} --password-stdin
${CONTAINER_RUNTIME} push ${FETCHMAIL_IMAGE_FULLY_QUALIFIED}
echo ${FETCHMAIL_IMAGE_REGISTRY_PASSWORD} | ${PODMAN_BIN} login ${FETCHMAIL_IMAGE_REGISTRY_NAME} --username ${FETCHMAIL_IMAGE_REGISTRY_USER} --password-stdin
${PODMAN_BIN} push ${FETCHMAIL_IMAGE_FULLY_QUALIFIED}
${PODMAN_BIN} logout ${FETCHMAIL_IMAGE_FULLY_QUALIFIED}
# PUSH CONTAINER IMAGE TO DOCKER
# ==============================================================================
PHONY+=container-image/push-to-docker-daemon
container-image/push-to-docker-daemon:
${PODMAN_BIN} push ${FETCHMAIL_IMAGE_FULLY_QUALIFIED} docker-daemon:${FETCHMAIL_IMAGE_FULLY_QUALIFIED}
# PHONY
# ==============================================================================