diff --git a/.gitignore b/.gitignore index 9575b391f..60e7ec63e 100644 --- a/.gitignore +++ b/.gitignore @@ -85,3 +85,4 @@ rules.mk .DS_Store /output +/cldr diff --git a/UnicodeJsps/Dockerfile b/UnicodeJsps/Dockerfile index 1a23e297f..1c1fdc76f 100644 --- a/UnicodeJsps/Dockerfile +++ b/UnicodeJsps/Dockerfile @@ -11,7 +11,7 @@ RUN ls -lh /build/source/bidiref1 && (/build/source/bidiref1 || true) ADD ./target/cldr-unicodetools.tgz /build/data/ # move this into place (including unicodetools/unicodetools) RUN rm -rf /build/data/cldr/.git # unneeded -FROM jetty:9-jre11-slim AS run +FROM jetty:9-jre11-alpine-eclipse-temurin AS run ADD port-entrypoint.sh /port-entrypoint.sh ADD ./jetty.d/ROOT /var/lib/jetty/webapps/ROOT/ ENTRYPOINT [ "/port-entrypoint.sh" ] diff --git a/docs/unicodejsps/gcp-run.md b/docs/unicodejsps/gcp-run.md new file mode 100644 index 000000000..c0ee56f51 --- /dev/null +++ b/docs/unicodejsps/gcp-run.md @@ -0,0 +1,64 @@ +# Manually Building and Pushing UnicodeJSPs to Docker / GCP Run + +- This page is Under Construction by Steven `@srl295` + +- see [index.md](./index.md) for the prior documentation + +## maven stuff + +- local build + +``` +mvn -B package -am -pl UnicodeJsps -DskipTests=true +``` + +- make a copy of CLDR - lots of ways to do this + +``` +git clone --reference-if-able ~/src/cldr https://github.com/unicode-org/cldr.git +mkdir -p UnicodeJsps/target && tar -cpz --exclude=.git -f UnicodeJsps/target/cldr-unicodetools.tgz ./cldr/ ./unicodetools/ +``` + +## docker stuff + +- build it + +``` +docker build -t unicode/unicode-jsps . +``` + +- try it + +``` +docker run --rm -p 8080:8080 unicode/unicode-jsps +``` + +=> + + +## cloudy stuff + +- install gcloud sdk + +- `gcloud init` + +- login to docker + +``` +gcloud auth configure-docker \ + us-central1-docker.pkg.dev +``` + +- build docker image + +``` +docker build -t us-central1-docker.pkg.dev/goog-unicode-dev/unicode-jsps/unicode-jsps:latest . +``` + +- push docker image + +_(takes a while - ~4G to push)_ + +``` +docker push us-central1-docker.pkg.dev/goog-unicode-dev/unicode-jsps/unicode-jsps:latest +``` diff --git a/docs/unicodejsps/index.md b/docs/unicodejsps/index.md index 4ed33e299..477f20d08 100644 --- a/docs/unicodejsps/index.md +++ b/docs/unicodejsps/index.md @@ -1,5 +1,13 @@ # Building UnicodeJsp +- Note: you can run the latest UnicodeJsp locally with docker using: + +``` +docker run --rm -p 8080:8080 unicode/unicode-jsp +``` + +- Note 2: there are some notes on updated processes for using GCP at [gcp-run.md](./gcp-run.md) - at present, automated deployment is TODO. + ## Compiling ### Prerequisites - Java