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
|
FROM docker.io/library/alpine:3.18.5
|
||||||
|
|
||||||
RUN echo "http://dl-3.alpinelinux.org/alpine/edge/testing/" >> /etc/apk/repositories
|
# The file /etc/apk/repositories contains a list of the apk repositories. By
|
||||||
RUN apk upgrade
|
# default contains this file a list of the stable repositories pointing to the
|
||||||
RUN apk add --update perl perl-lockfile-simple perl-dbi perl-dbd-pg perl-dbd-mysql fetchmail
|
# 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
|
RUN mkdir --parents /run/fetchmail
|
||||||
|
|
||||||
COPY --chown=fetchmail:fetchmail fetchmail.pl /usr/local/bin/fetchmail.pl
|
COPY --chown=fetchmail:fetchmail fetchmail.pl /usr/local/bin/fetchmail.pl
|
||||||
|
|
||||||
USER fetchmail
|
USER fetchmail
|
||||||
|
|
||||||
ENTRYPOINT [ "/usr/bin/perl" ]
|
|
||||||
CMD [ "/usr/local/bin/fetchmail.pl" ]
|
CMD [ "/usr/local/bin/fetchmail.pl" ]
|
38
Makefile
38
Makefile
@ -1,44 +1,44 @@
|
|||||||
# CONTAINER_RUNTIME
|
# PODMAN_BIN's and tools
|
||||||
# The CONTAINER_RUNTIME variable will be used to specified the path to a
|
PODMAN_BIN?=$(shell which podman)
|
||||||
# container runtime. This is needed to start and run a container image.
|
SKOPEO_BIN?=$(shell which skopeo)
|
||||||
CONTAINER_RUNTIME?=$(shell which podman)
|
|
||||||
|
|
||||||
# FETCHMAIL_IMAGE_REGISTRY_NAME
|
# FETCHMAIL_IMAGE
|
||||||
# Defines the name of the new container to be built using several variables.
|
FETCHMAIL_IMAGE_REGISTRY_HOST:=git.cryptic.systems
|
||||||
FETCHMAIL_IMAGE_REGISTRY_NAME:=docker.io
|
FETCHMAIL_IMAGE_REPOSITORY?=volker.raschek/postfixadmin-fetchmail
|
||||||
FETCHMAIL_IMAGE_REGISTRY_USER:=volkerraschek
|
|
||||||
|
|
||||||
FETCHMAIL_IMAGE_NAMESPACE?=${FETCHMAIL_IMAGE_REGISTRY_USER}
|
|
||||||
FETCHMAIL_IMAGE_NAME:=postfixadmin-fetchmail
|
|
||||||
FETCHMAIL_IMAGE_VERSION?=latest
|
FETCHMAIL_IMAGE_VERSION?=latest
|
||||||
FETCHMAIL_IMAGE_FULLY_QUALIFIED=${FETCHMAIL_IMAGE_REGISTRY_NAME}/${FETCHMAIL_IMAGE_NAMESPACE}/${FETCHMAIL_IMAGE_NAME}:${FETCHMAIL_IMAGE_VERSION}
|
FETCHMAIL_IMAGE_FULLY_QUALIFIED=${FETCHMAIL_IMAGE_REGISTRY_HOST}/${FETCHMAIL_IMAGE_REPOSITORY}:${FETCHMAIL_IMAGE_VERSION}
|
||||||
FETCHMAIL_IMAGE_UNQUALIFIED=${FETCHMAIL_IMAGE_NAMESPACE}/${FETCHMAIL_IMAGE_NAME}:${FETCHMAIL_IMAGE_VERSION}
|
|
||||||
|
|
||||||
# BUILD CONTAINER IMAGE
|
# BUILD CONTAINER IMAGE
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
PHONY:=container-image/build
|
PHONY:=container-image/build
|
||||||
container-image/build:
|
container-image/build:
|
||||||
${CONTAINER_RUNTIME} build \
|
${PODMAN_BIN} build \
|
||||||
--file Dockerfile \
|
--file Dockerfile \
|
||||||
--no-cache \
|
--no-cache \
|
||||||
--pull \
|
--pull \
|
||||||
--tag ${FETCHMAIL_IMAGE_FULLY_QUALIFIED} \
|
--tag ${FETCHMAIL_IMAGE_FULLY_QUALIFIED} \
|
||||||
--tag ${FETCHMAIL_IMAGE_UNQUALIFIED} \
|
|
||||||
.
|
.
|
||||||
|
|
||||||
# DELETE CONTAINER IMAGE
|
# DELETE CONTAINER IMAGE
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
PHONY:=container-image/delete
|
PHONY:=container-image/delete
|
||||||
container-image/delete:
|
container-image/delete:
|
||||||
- ${CONTAINER_RUNTIME} image rm ${FETCHMAIL_IMAGE_FULLY_QUALIFIED} ${FETCHMAIL_IMAGE_UNQUALIFIED}
|
- ${PODMAN_BIN} image rm ${FETCHMAIL_IMAGE_FULLY_QUALIFIED}
|
||||||
- ${CONTAINER_RUNTIME} image rm ${BASE_IMAGE_FULL}
|
- ${PODMAN_BIN} image rm ${BASE_IMAGE_FULL}
|
||||||
|
|
||||||
# PUSH CONTAINER IMAGE
|
# PUSH CONTAINER IMAGE
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
PHONY+=container-image/push
|
PHONY+=container-image/push
|
||||||
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
|
echo ${FETCHMAIL_IMAGE_REGISTRY_PASSWORD} | ${PODMAN_BIN} login ${FETCHMAIL_IMAGE_REGISTRY_HOST} --username ${FETCHMAIL_IMAGE_REGISTRY_USER} --password-stdin
|
||||||
${CONTAINER_RUNTIME} push ${FETCHMAIL_IMAGE_FULLY_QUALIFIED}
|
${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
|
# PHONY
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
|
@ -2,7 +2,7 @@ version: "3"
|
|||||||
services:
|
services:
|
||||||
postfixadmin-fetchmail:
|
postfixadmin-fetchmail:
|
||||||
container_name: postfixadmin-fetchmail
|
container_name: postfixadmin-fetchmail
|
||||||
image: docker.io/volkerraschek/postfixadmin-fetchmail:latest
|
image: git.cryptic.systems/volker.raschek/postfixadmin-fetchmail:latest
|
||||||
environment:
|
environment:
|
||||||
- DATABASE_TYPE=${DATABASE_TYPE}
|
- DATABASE_TYPE=${DATABASE_TYPE}
|
||||||
- DATABASE_USER=${DATABASE_USER}
|
- DATABASE_USER=${DATABASE_USER}
|
||||||
|
Loading…
Reference in New Issue
Block a user