diff options
| -rw-r--r-- | Dockerfile | 10 | ||||
| -rwxr-xr-x | entrypoint.sh | 4 | ||||
| -rw-r--r-- | www/index.html | 10 |
3 files changed, 24 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..4363441 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +FROM busybox +ARG who="Web" +COPY www /var/www +WORKDIR /var/www +RUN sed -i "s/Web/$who/" index.html +VOLUME /var/www +EXPOSE 80 +RUN mkdir -p /usr/local/sbin +COPY entrypoint.sh /usr/local/sbin +CMD ["entrypoint.sh"] diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100755 index 0000000..b4df5cd --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,4 @@ +#!/bin/sh +sed -i "s/hostname/$(hostname)/" index.html +httpd -f + diff --git a/www/index.html b/www/index.html new file mode 100644 index 0000000..70d0847 --- /dev/null +++ b/www/index.html @@ -0,0 +1,10 @@ +<!DOCTYPE html> +<html> + <head> + <title>Hello Web</title> + </head> + <body> + <h1>Hello Web</h1> + <p>Depuis le Docker hostname</p> + </body> +</html> |
