Fix Dockerfile.dev and add info to doc
Avoid: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "/srv/app/start_ckan_development.sh": permission denied: unknown
This commit is contained in:
parent
0ba0561f31
commit
65c038afd0
18
README.md
18
README.md
|
@ -337,6 +337,24 @@ The Docker image config files used to build your CKAN project are located in the
|
|||
|
||||
* Any custom changes to the scripts run during container start up can be made to scripts in the `setup/` directory. For instance if you wanted to change the port on which CKAN runs you would need to make changes to the Docker Compose yaml file, and the `start_ckan.sh.override` file. Then you would need to add the following line to the Dockerfile ie: `COPY setup/start_ckan.sh.override ${APP_DIR}/start_ckan.sh`. The `start_ckan.sh` file in the locally built image would override the `start_ckan.sh` file included in the base image
|
||||
|
||||
>**Note**<br>
|
||||
> If you get an error like ` doesn't have execute permissions`:
|
||||
>
|
||||
>```log
|
||||
>Daemon error response: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "/srv/app/start_ckan.sh": permission denied: unknown
|
||||
>```
|
||||
>
|
||||
>It may be necessary to give execute permissions to the file in the `Dockerfile`:
|
||||
>
|
||||
>```dockerfile
|
||||
>...
|
||||
># Override start_ckan.sh
|
||||
>COPY setup/start_ckan.sh.override ${APP_DIR}/start_ckan.sh
|
||||
>RUN chmod +x ${APP_DIR}/start_ckan.sh
|
||||
>...
|
||||
>```
|
||||
|
||||
|
||||
|
||||
## CKAN images enhancement
|
||||
### Extending the base images
|
||||
|
|
|
@ -52,16 +52,17 @@ COPY docker-entrypoint.d/* /docker-entrypoint.d/
|
|||
COPY setup/who.ini ${APP_DIR}/
|
||||
|
||||
# Override start_ckan.sh with DEV sh
|
||||
# COPY setup/start_ckan_development.sh.override ${APP_DIR}/start_ckan.sh
|
||||
COPY setup/start_ckan_development.sh.override ${APP_DIR}/start_ckan_development.sh
|
||||
RUN chmod +x ${APP_DIR}/start_ckan_development.sh
|
||||
|
||||
# Apply any patches needed to CKAN core or any of the built extensions (not the
|
||||
# runtime mounted ones)
|
||||
COPY patches ${APP_DIR}/patches
|
||||
# COPY patches ${APP_DIR}/patches
|
||||
|
||||
RUN for d in $APP_DIR/patches/*; do \
|
||||
if [ -d $d ]; then \
|
||||
for f in `ls $d/*.patch | sort -g`; do \
|
||||
cd $SRC_DIR/`basename "$d"` && echo "$0: Applying patch $f to $SRC_DIR/`basename $d`"; patch -p1 < "$f" ; \
|
||||
done ; \
|
||||
fi ; \
|
||||
done
|
||||
# RUN for d in $APP_DIR/patches/*; do \
|
||||
# if [ -d $d ]; then \
|
||||
# for f in `ls $d/*.patch | sort -g`; do \
|
||||
# cd $SRC_DIR/`basename "$d"` && echo "$0: Applying patch $f to $SRC_DIR/`basename $d`"; patch -p1 < "$f" ; \
|
||||
# done ; \
|
||||
# fi ; \
|
||||
# done
|
Loading…
Reference in New Issue