Static error pages
Paramtamtam edited this page Jan 28, 2022
·
1 revision
You may want to use the generated error pages somewhere else, and you can simply extract them from the docker image to your local directory for this purpose:
$ docker create --name error-pages tarampampam/error-pages
$ docker cp error-pages:/opt/html ./out
$ docker rm -f error-pages
$ ls ./out
ghost hacker-terminal index.html l7-dark l7-light noise shuffle
$ tree
.
βββ out
βββ ghost
β βββ 400.html
β βββ ...
β βββ 505.html
βββ hacker-terminal
β βββ 400.html
β βββ ...
β βββ 505.html
βββ index.html
βββ l7-dark
β βββ 400.html
β βββ ...
...
Or inside another docker image:
FROM alpine:latest
COPY --from=tarampampam/error-pages /opt/html /error-pages
RUN ls -l /error-pages
$ docker build --rm .
...
Step 3/3 : RUN ls -l /error-pages
---> Running in 30095dc344a9
total 12
drwxr-xr-x 2 root root 326 Sep 29 15:44 ghost
drwxr-xr-x 2 root root 326 Sep 29 15:44 hacker-terminal
-rw-r--r-- 1 root root 11241 Sep 29 15:44 index.html
drwxr-xr-x 2 root root 326 Sep 29 15:44 l7-dark
drwxr-xr-x 2 root root 326 Sep 29 15:44 l7-light
drwxr-xr-x 2 root root 326 Sep 29 15:44 noise
drwxr-xr-x 2 root root 326 Sep 29 15:44 shuffle