Compare commits

..

5 Commits

Author SHA1 Message Date
CSRBot b26d8cc991
chore(deps): update docker.io/library/alpine docker tag to v3.19.1
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2024-03-02 14:15:40 +00:00
Markus Pesch 95374d36bd
fix(Makefile): logout correctly
continuous-integration/drone/push Build is passing Details
2024-03-02 14:42:46 +01:00
Markus Pesch 71d28ec0ab
fix(Makefile): remove obsolete SKOPEO_BIN
continuous-integration/drone/push Build is passing Details
2024-03-02 14:38:30 +01:00
Markus Pesch 04df683517
fix: move from docker.io to git.cryptic.systems
continuous-integration/drone/push Build is passing Details
2024-03-02 14:36:26 +01:00
Markus Pesch 7974b3fb4b
fix: install perl-lockfile-simple from edge repository 2024-03-02 14:31:59 +01:00
3 changed files with 38 additions and 25 deletions

View File

@ -1,13 +1,28 @@
FROM docker.io/library/alpine:3.19.1
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,47 +1,45 @@
# 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)
# FETCHMAIL_IMAGE_REGISTRY_NAME
# Defines the name of the new container to be built using several variables.
FETCHMAIL_IMAGE_REGISTRY_NAME:=docker.io
FETCHMAIL_IMAGE_REGISTRY_USER:=volkerraschek
FETCHMAIL_IMAGE_NAMESPACE?=${FETCHMAIL_IMAGE_REGISTRY_USER}
FETCHMAIL_IMAGE_NAME:=postfixadmin-fetchmail
# FETCHMAIL_IMAGE
FETCHMAIL_IMAGE_REGISTRY_HOST:=git.cryptic.systems
FETCHMAIL_IMAGE_REPOSITORY?=volker.raschek/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}
FETCHMAIL_IMAGE_FULLY_QUALIFIED=${FETCHMAIL_IMAGE_REGISTRY_HOST}/${FETCHMAIL_IMAGE_REPOSITORY}:${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}
# 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_HOST} --username ${FETCHMAIL_IMAGE_REGISTRY_USER} --password-stdin
${PODMAN_BIN} push ${FETCHMAIL_IMAGE_FULLY_QUALIFIED}
${PODMAN_BIN} logout ${FETCHMAIL_IMAGE_REGISTRY_HOST}
# 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
# ==============================================================================
# Declare the contents of the PHONY variable as phony. We keep that information
# in a variable so we can use it in if_changed.
.PHONY: ${PHONY}
.PHONY: ${PHONY}

View File

@ -2,7 +2,7 @@ version: "3"
services:
postfixadmin-fetchmail:
container_name: postfixadmin-fetchmail
image: docker.io/volkerraschek/postfixadmin-fetchmail:latest
image: git.cryptic.systems/volker.raschek/postfixadmin-fetchmail:latest
environment:
- DATABASE_TYPE=${DATABASE_TYPE}
- DATABASE_USER=${DATABASE_USER}