Thanks for your support. I really appreciate this.
I was successful with the following approach:
- from my server I ran
git clone https://github.com/senaite/senaite.docker
cd senaite.docker
cp -R 1.3.2 1.3.3
cd 1.3.3
mkdir src
cd src
Then I git cloned all senaite packages into the “src” folder.
Back in the “1.3.3” folder I modified the “Dockerfile” to read:
# Use an official Python runtime as a parent image
FROM python:2.7-stretch
# Set one or more individual labels
LABEL senaite.core.version="1.3.3-git"
# Set environment variables
ENV PLONE_MAJOR=4.3 \
PLONE_VERSION=4.3.19 \
PLONE_MD5=04ed5beac7fb8504f06a36d44e407b06 \
SENAITE_HOME=/home/senaite \
SENAITE_USER=senaite \
SENAITE_INSTANCE_HOME=/home/senaite/senaitelims \
SENAITE_DATA=/data \
SENAITE_FILESTORAGE=/data/filestorage \
SENAITE_BLOBSTORAGE=/data/blobstorage \
ADDONS='senaite.lims senaite.core senaite.core.supermodel senaite.core.listing senaite.impress senaite.storage' \
DEVELOP='src/senaite.lims src/senaite.core src/senaite.core.supermodel src/senaite.core.listing src/senaite.impress src/senaite.storage'
# Create the senaite user
RUN useradd --system -m -d $SENAITE_HOME -U -u 500 $SENAITE_USER
# Create direcotries
RUN mkdir -p $SENAITE_INSTANCE_HOME $SENAITE_FILESTORAGE $SENAITE_BLOBSTORAGE
RUN echo "deb http://deb.debian.org/debian stretch-backports main contrib non-free" >> /etc/apt/sources.list
# Copy the package config
COPY packages.txt /
# Install package dependencies
RUN apt-get update && apt-get install -y --no-install-recommends $(grep -vE "^\s*#" /packages.txt | tr "\n" " ") && apt-get -t stretch-backports install -y --no-install-recommends python-lxml && pip install lxml
# Fetch unified installer
RUN wget -O Plone.tgz https://launchpad.net/plone/$PLONE_MAJOR/$PLONE_VERSION/+download/Plone-$PLONE_VERSION-UnifiedInstaller.tgz \
&& echo "$PLONE_MD5 Plone.tgz" | md5sum -c - \
&& tar -xzf Plone.tgz \
&& cp -rv /Plone-$PLONE_VERSION-UnifiedInstaller/base_skeleton/* $SENAITE_INSTANCE_HOME \
&& cp -v /Plone-$PLONE_VERSION-UnifiedInstaller/buildout_templates/buildout.cfg $SENAITE_INSTANCE_HOME/buildout-base.cfg \
&& cd $SENAITE_HOME \
&& tar -xjf /Plone-$PLONE_VERSION-UnifiedInstaller/packages/buildout-cache.tar.bz2 \
&& rm -rf /Plone-$PLONE_VERSION-UnifiedInstaller /Plone.tgz
# Change working directory
WORKDIR $SENAITE_INSTANCE_HOME
# Copy Buildout
COPY bootstrap.py buildout.cfg ./
COPY src ./src
# Bootstrap and buildout
RUN python bootstrap.py \
&& bin/buildout \
&& ln -s $SENAITE_FILESTORAGE/ var/filestorage \
&& ln -s $SENAITE_BLOBSTORAGE/ var/blobstorage \
&& chown -R senaite:senaite $SENAITE_HOME $SENAITE_DATA \
&& rm -rf $SENAITE_HOME/buildout-cache/downloads/dist
# Mount external volume
VOLUME /data
# Copy startup scripts
COPY docker-initialize.py docker-entrypoint.sh /
# Expose instance port
EXPOSE 8080
# Add instance healthcheck
HEALTHCHECK --interval=1m --timeout=5s --start-period=1m \
CMD nc -z -w5 127.0.0.1 8080 || exit 1
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["start"]
The “docker-compose” file was modified to read:
version: "2"
services:
senaite:
image: senaite-1.3.3-git:arm64
volumes:
- data:/data
- $PWD/src:/home/senaite/senaitelims/src
ports:
- "8080:8080"
environment:
#- ADDONS=senaite.kanban
- DEVELOP=src/senaite.core src/senaite.storage src/senaite.core.listing src/senaite.core.supermodel src/senaite.impress src/senaite.lims
- ADDONS=senaite.core senaite.storage senaite.core.listing senaite.core.supermodel senaite.impress senaite.lims
- VERSIONS=senaite.core=1.3.3 senaite.lims=1.3.2.1
volumes:
data:
In “buildout.cfg” I uncommented the lines which defined distinct versions for the senaite packages.
Now I built the docker image with
docker build -t senaite-1.3.3-git:arm64 .
I started the container with
docker-compose up
Now I have the current Seanite packages listed under “Addons” in the Plone configuration panel.
The email configuration works now!
Hope that this may help someone else!
BTW: You may have recognized that the platform “arm64”. I had to modify the “Dockerfile” to let it build on arm64.
Cheers.
`