* Add Amazon Linux 2 as a supported OS. * Dynamically select the package manager for Amazon and Oracle Linux. * Prepare for supporting PostgreSQL 18. Specifically, the Docker image seems to have moved the data directory, so get that dynamically.
23 lines
408 B
Plaintext
23 lines
408 B
Plaintext
# Dockerfile.rpm
|
|
|
|
ARG DISTRO=amazonlinux
|
|
ARG RELEASE=2023
|
|
|
|
FROM ${DISTRO}:${RELEASE}
|
|
|
|
ARG DISTRO
|
|
ARG RELEASE
|
|
|
|
RUN if [ ${RELEASE} -le 2 ] ; then MGR=yum ; else MGR=dnf ; fi && \
|
|
${MGR} install -y \
|
|
rpm-build \
|
|
make \
|
|
&& ${MGR} clean all
|
|
|
|
RUN echo -e "#!/bin/bash\nmake actually-package-${DISTRO}-${RELEASE}" > /init.sh \
|
|
&& chmod 755 /init.sh
|
|
|
|
WORKDIR /src
|
|
|
|
CMD ["/bin/bash", "/init.sh"]
|