phpList / phplist-docker

Dockerised version of phpList
32 stars 18 forks source link

Unable to start a dev environment : error copying from phplist-unknown/ #14

Closed hedrickbt closed 2 years ago

hedrickbt commented 3 years ago

I have tried setting the version via the .env file and export without any change.

my .env file

PORT=8000
HOSTNAME=localhost
THEME_DEV_PATH=/home/testuser/phplist/themes
CODE_PATH=/home/testuser/phplist/phplist3/public_html/
PLUGIN_DEV_PATH=/home/testuser/phplist/plugins

./start-phplist.sh .. => CACHED [11/15] RUN echo VERSION=unknown 0.0s => CACHED [12/15] RUN rm -rf /var/www/phpList3 && mkdir /var/www/phpList3 0.0s => ERROR [13/15] COPY phplist-unknown/ /var/www/phpList3

michield commented 3 years ago

It's trying to build the image, by the looks of it. That's not necessary

What happens if you run

docker-compose -f phplist-dev.yml up -d

hedrickbt commented 3 years ago

Same result.

$ docker-compose -f phplist-dev.yml up -d
Creating network "phplist-docker_default" with the default driver
Building phplist
[+] Building 0.9s (17/19)
 => [internal] load build definition from Dockerfile                                                                                                                                                      0.0s
 => => transferring dockerfile: 38B                                                                                                                                                                       0.0s
 => [internal] load .dockerignore                                                                                                                                                                         0.0s
 => => transferring context: 2B                                                                                                                                                                           0.0s
 => [internal] load metadata for docker.io/library/debian:buster-slim                                                                                                                                     0.8s
 => [internal] load build context                                                                                                                                                                         0.0s
 => => transferring context: 173B                                                                                                                                                                         0.0s
 => [ 1/15] FROM docker.io/library/debian:buster-slim@sha256:b586cf8c850cada85a47599f08eb34ede4a7c473551fd7c68cbf20ce5f8dbbf1                                                                             0.0s
 => CACHED [ 2/15] RUN apt-get update && apt-get upgrade -y                                                                                                                                               0.0s
 => CACHED [ 3/15] RUN apt-get install -y apt-utils     vim apache2 net-tools php-mysql     libapache2-mod-php php-curl php-gd     git cron php-imap php-xml php-zip php-mbstring                         0.0s
 => CACHED [ 4/15] RUN rm -f /etc/apache2/sites-enabled/000-default.conf &&     cd /var/www/ && find . -type d -name .git -print0 | xargs -0 rm -rf &&     find . -type d -print0 | xargs -0 chmod 755 &  0.0s
 => CACHED [ 5/15] COPY docker-apache-phplist.conf /etc/apache2/sites-enabled/                                                                                                                            0.0s
 => CACHED [ 6/15] COPY phplist-crontab /                                                                                                                                                                 0.0s
 => CACHED [ 7/15] RUN crontab /phplist-crontab                                                                                                                                                           0.0s
 => CACHED [ 8/15] COPY docker-entrypoint.sh /usr/local/bin/                                                                                                                                              0.0s
 => CACHED [ 9/15] RUN useradd -d /var/www/phpList3 phplist                                                                                                                                               0.0s
 => CACHED [10/15] RUN echo REFRESH=unknown                                                                                                                                                               0.0s
 => CACHED [11/15] RUN echo VERSION=unknown                                                                                                                                                               0.0s
 => CACHED [12/15] RUN rm -rf /var/www/phpList3 && mkdir /var/www/phpList3                                                                                                                                0.0s
 => ERROR [13/15] COPY phplist-unknown/ /var/www/phpList3                                                                                                                                                 0.0s
------
 > [13/15] COPY phplist-unknown/ /var/www/phpList3:
------
failed to compute cache key: "/phplist-unknown" not found: not found
ERROR: Service 'phplist' failed to build

To be able to work, I...

  1. Modified phplist/Dockerfile
    
    ...
    #COPY phplist-${VERSION}/ /var/www/phpList3
    #COPY docker-phplist-config-live.php /var/www/phpList3/config.php

RUN mkdir -p /var/www/phpList3/public_html/images && \

mkdir -p /var/www/phpList3/public_html/lists/admin/plugins && \

chmod 777 /var/www/phpList3/public_html/images && \

chmod 777 /var/www/phpList3/public_html/lists/admin/plugins

...

VOLUME ["/var/www", "/var/log/apache2"]

...


2. Built my own image from that Dockerfile
3. Modified phplist-dev.yml to reference the image I built

Then, I was able to work.

michield commented 2 years ago

Reported working now