From 81c2d79d30ea4372d9e58ec5896ecc6c1d33de8a Mon Sep 17 00:00:00 2001 From: "Steven R. Loomis" Date: Thu, 26 Sep 2019 15:22:52 -0700 Subject: [PATCH] ICU-13668 update ICU4C Demos to run in GCE - document that the default port is now 8080 instead of 80 --- icu-kube/README.md | 6 +++--- icu-kube/docker.d/icu4c-demos/Dockerfile | 3 ++- icu-kube/index.html | 2 ++ icu-kube/lighttpd.conf | 13 +++++++++++-- 4 files changed, 18 insertions(+), 6 deletions(-) create mode 100644 icu-kube/index.html diff --git a/icu-kube/README.md b/icu-kube/README.md index 64243449..a53bbda3 100644 --- a/icu-kube/README.md +++ b/icu-kube/README.md @@ -3,7 +3,7 @@ Dockerized ICU4C Demos - Build with `sh build.sh` -- Run with `docker run --rm -p 18080:80 unicode/icu4c-demos:latest` - will listen on port 18080 +- Run with `docker run --rm -p 18080:8080 unicode/icu4c-demos:latest` - will listen on port 18080 ## Building with a special ICU version @@ -37,7 +37,7 @@ $ docker build --build-arg ICU_PATH=http://999.999.999.999:5000/icu-r84d16d8c6c- - If all goes well (it did, right?): you can now run ```sh -$ docker run --rm -p 8888:80 icu4c-demos:my-demos +$ docker run --rm -p 8888:8080 icu4c-demos:my-demos ``` -… That will serve up the demos at http://localhost:8888/icu-bin/icudemos \ No newline at end of file +… That will serve up the demos at http://localhost:8888/icu-bin/icudemos diff --git a/icu-kube/docker.d/icu4c-demos/Dockerfile b/icu-kube/docker.d/icu4c-demos/Dockerfile index 4173bb88..08dfb956 100644 --- a/icu-kube/docker.d/icu4c-demos/Dockerfile +++ b/icu-kube/docker.d/icu4c-demos/Dockerfile @@ -46,6 +46,7 @@ RUN if [ $ICU_PATH = "system" ]; then apk --update add icu-dev ; else apk --upda COPY --from=build /home/build/icu /home/build/icu RUN if [ -d /home/build/icu/usr/local ]; then (cd /home/build/icu/usr/; ln -sv local/* .); fi; ls -l /home/build/icu/usr/bin/ ENV LD_LIBRARY_PATH /home/build/icu/usr/lib -EXPOSE 80 +EXPOSE 8080 COPY icu-kube/lighttpd.conf /etc/lighttpd/lighttpd.conf +COPY icu-kube/index.html /var/www/localhost/htdocs/index.html CMD ["lighttpd", "-D", "-f", "/etc/lighttpd/lighttpd.conf"] diff --git a/icu-kube/index.html b/icu-kube/index.html new file mode 100644 index 00000000..40255a88 --- /dev/null +++ b/icu-kube/index.html @@ -0,0 +1,2 @@ +Click here for the ICU4C Demos. + diff --git a/icu-kube/lighttpd.conf b/icu-kube/lighttpd.conf index b632fb39..60a04e70 100644 --- a/icu-kube/lighttpd.conf +++ b/icu-kube/lighttpd.conf @@ -1,7 +1,16 @@ server.modules = ( "mod_alias", "mod_redirect", "mod_cgi" ) -server.document-root = "/var/www/html" +server.document-root = "/var/www/localhost/htdocs/" +index-file.names = ( "index.html" ) + +server.port = 8080 + +mimetype.assign = ( + ".html" => "text/html", + ".txt" => "text/plain", + ".jpg" => "image/jpeg", + ".png" => "image/png" +) -server.port = 80 $HTTP["url"] =~ "^/icu-bin/" { alias.url += ( "/icu-bin/" => "/home/build/icu/usr/bin/" )