Compare commits
2 Commits
444d4a63f4
...
04df683517
Author | SHA1 | Date | |
---|---|---|---|
04df683517 | |||
7974b3fb4b |
23
Dockerfile
23
Dockerfile
@ -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" ]
|
38
Makefile
38
Makefile
@ -1,44 +1,44 @@
|
||||
# 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.
|
||||
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}
|
||||
- ${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_HOST} --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
|
||||
# ==============================================================================
|
||||
|
@ -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}
|
||||
|
Loading…
Reference in New Issue
Block a user