I downloaded Directus.io repo https://github.com/directus/directus and I want to create own image. How to do it using Dockerfile.
I tried to run script from repo docker https://github.com/directus/docker but i got error with message:
Step 7/13 : COPY --chown=www-data:www-data ./directus/ /var/directus/
COPY failed: stat /var/lib/docker/tmp/docker-builder151402968/directus: no such file or directory
Here is a Dockerfile
from our project which works just fine:
#
# Final image
#
FROM directus/directus:v8-apache
#
# Filesystem & permissions
#
COPY ./rootfs/ /
RUN chmod +x install.sh
#
# Port
#
EXPOSE 80
ENTRYPOINT ./install.sh
In the same directory we have rootfs
dir with a content what we want to override from Directus, eg config files, some CSS etc...
/rootfs
var
directus
public
admin
style.css
src
install.sh
Our install.sh
script contains some stuff we need to run on startup. The most important is to start Apache in the end:
#!/bin/bash
# ...
# Our custom scripts
# ...
apache2-foreground
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.