docker-phpLDAPadmin icon indicating copy to clipboard operation
docker-phpLDAPadmin copied to clipboard

Custom build image issue

Open pptfz opened this issue 6 months ago • 0 comments

My computer is based on the arm architecture, so I need to customize and build an image of the arm architecture I performed the following operations, but the container failed to start in the end. I have some questions. Could you please take a look

Clone the repository and enter the directory

git clone https://github.com/ltb-project/self-service-password.git
cd self-service-password/packaging/docker

Modify the Dockerfile

FROM base AS build

COPY entrypoint.sh /entrypoint.sh # new add
...

Build an image of the arm architecture

docker buildx build --platform linux/arm64 -t my-repo/self-service-password:1.7.3 . --push

Start the container using the built arm image

docker run -d \
  --restart=always \
  --name self-service-password \
  -p 8000:80 \
  -v /data/docker-volume/ssp/config.inc.local.php:/var/www/conf/config.inc.local.php \
  my-repo/self-service-password:1.7.3

Startup error report

docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: exec: "/entrypoint.sh": stat /entrypoint.sh: no such file or directory: unknown

packaging/docker/Dockerfile Finally, entrypoint ["/entrypoint.sh"] was used, but I saw that in the Dockerfile file, there was no operation to COPY entrypoint.sh. So, how can the container be started without copying it in

ENTRYPOINT [ "/entrypoint.sh" ]
CMD [ "apache2-foreground" ]

Did the official use these two files to build the image Dockerfile Dockerfile.alpine

pptfz avatar Jun 20 '25 03:06 pptfz