Skip to content

Commit 51e7890

Browse files
authored
chore(jsp): wip docs and updated dockerfile (#531)
- some docs on the new GCP run environment - update the Dockerfile to be less vulnerable - also ignore 'cldr' which is a location used by the automated build For #523
1 parent 5c75c44 commit 51e7890

File tree

4 files changed

+74
-1
lines changed

4 files changed

+74
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,4 @@ rules.mk
8585

8686
.DS_Store
8787
/output
88+
/cldr

UnicodeJsps/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ RUN ls -lh /build/source/bidiref1 && (/build/source/bidiref1 || true)
1111
ADD ./target/cldr-unicodetools.tgz /build/data/
1212
# move this into place (including unicodetools/unicodetools)
1313
RUN rm -rf /build/data/cldr/.git # unneeded
14-
FROM jetty:9-jre11-slim AS run
14+
FROM jetty:9-jre11-alpine-eclipse-temurin AS run
1515
ADD port-entrypoint.sh /port-entrypoint.sh
1616
ADD ./jetty.d/ROOT /var/lib/jetty/webapps/ROOT/
1717
ENTRYPOINT [ "/port-entrypoint.sh" ]

docs/unicodejsps/gcp-run.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Manually Building and Pushing UnicodeJSPs to Docker / GCP Run
2+
3+
- This page is Under Construction by Steven `@srl295`
4+
5+
- see [index.md](./index.md) for the prior documentation
6+
7+
## maven stuff
8+
9+
- local build
10+
11+
```
12+
mvn -B package -am -pl UnicodeJsps -DskipTests=true
13+
```
14+
15+
- make a copy of CLDR - lots of ways to do this
16+
17+
```
18+
git clone --reference-if-able ~/src/cldr https://github.com/unicode-org/cldr.git
19+
mkdir -p UnicodeJsps/target && tar -cpz --exclude=.git -f UnicodeJsps/target/cldr-unicodetools.tgz ./cldr/ ./unicodetools/
20+
```
21+
22+
## docker stuff
23+
24+
- build it
25+
26+
```
27+
docker build -t unicode/unicode-jsps .
28+
```
29+
30+
- try it
31+
32+
```
33+
docker run --rm -p 8080:8080 unicode/unicode-jsps
34+
```
35+
36+
=> <http://127.0.0.1:8080>
37+
38+
39+
## cloudy stuff
40+
41+
- install gcloud sdk
42+
43+
- `gcloud init`
44+
45+
- login to docker
46+
47+
```
48+
gcloud auth configure-docker \
49+
us-central1-docker.pkg.dev
50+
```
51+
52+
- build docker image
53+
54+
```
55+
docker build -t us-central1-docker.pkg.dev/goog-unicode-dev/unicode-jsps/unicode-jsps:latest .
56+
```
57+
58+
- push docker image
59+
60+
_(takes a while - ~4G to push)_
61+
62+
```
63+
docker push us-central1-docker.pkg.dev/goog-unicode-dev/unicode-jsps/unicode-jsps:latest
64+
```

docs/unicodejsps/index.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Building UnicodeJsp
22

3+
- Note: you can run the latest UnicodeJsp locally with docker using:
4+
5+
```
6+
docker run --rm -p 8080:8080 unicode/unicode-jsp
7+
```
8+
9+
- 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.
10+
311
## Compiling
412
### Prerequisites
513
- Java

0 commit comments

Comments
 (0)