You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: images/server/7.1.0/docs/content.md
+15-15Lines changed: 15 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,13 +13,13 @@
13
13
Run GlassFish with the following command:
14
14
15
15
```
16
-
docker run -p 8080:8080 -p 4848:4848 @docker.glassfish.repository@
16
+
docker run -p 8080:8080 -p 4848:4848 glassfish
17
17
```
18
18
19
19
Or with a command for a specific tag (GlassFish version):
20
20
21
21
```
22
-
docker run -p 8080:8080 -p 4848:4848 @docker.glassfish.image@
22
+
docker run -p 8080:8080 -p 4848:4848 glassfish:7.1.0
23
23
```
24
24
25
25
Open the following URLs in the browser:
@@ -52,13 +52,13 @@ Follow these steps:
52
52
3. Run the following command to start GlassFish in Docker with your application, where `/deployments` is path to the directory created in step 1, and /deploy is the directory in the container where GlassFish expects applications:
53
53
54
54
```
55
-
docker run -p 8080:8080 -p 4848:4848 -v /deployments:/deploy @docker.glassfish.repository@
55
+
docker run -p 8080:8080 -p 4848:4848 -v /deployments:/deploy glassfish
56
56
```
57
57
58
58
Alternatively, you can mount a specific WAR file directly:
59
59
60
60
```
61
-
docker run -p 8080:8080 -p 4848:4848 -v /deployment/application.war:/deploy/application.war @docker.glassfish.repository@
61
+
docker run -p 8080:8080 -p 4848:4848 -v /deployment/application.war:/deploy/application.war glassfish
62
62
```
63
63
64
64
**Note**: GlassFish Server deploys applications using the WAR filename as the context path (e.g., `application.war` becomes accessible at `/application/`).
@@ -74,15 +74,15 @@ The context root (`application`) is derived from the name of the application fil
74
74
You can modify the start command of the Docker container to `startserv --debug` to enable debug mode. You should also map the debug port 9009.
@@ -117,7 +117,7 @@ However, always consider to executing any asadmin configuration commands during
117
117
118
118
Just create a file `${PATH_GF_HOME}/custom/init.asadmin` (`/opt/glassfish7/custom/init.asadmin`), the commands will be executed before GlassFish server starts.
119
119
120
-
Within the `init.asadmin` file, you can specify any asadmin command. Most of the commands require that the server is running, so you'll need to start the server first, run the configuration commands, and then stop the server.
120
+
Within the `init.asadmin` file, you can specify any asadmin command. Most of the commands require that the server is running, so you'll need to start the server first, run the configuration commands, and then stop the server.
121
121
122
122
For example, to start GlassFish, increase the maximum amount of threads, and then stop it, the `init.asadmin` file can contain:
123
123
@@ -130,7 +130,7 @@ stop-domain
130
130
You can provide the file by mounting its directory to the `/opt/glassfish7/custom` directory in the container when running the container:
131
131
132
132
```
133
-
docker run -v ./custom:/opt/glassfish7/custom -p 8080:8080 -ti @docker.glassfish.repository@
133
+
docker run -v ./custom:/opt/glassfish7/custom -p 8080:8080 -ti glassfish
You can provide the script by mounting its directory to the `/opt/glassfish7/custom` directory in the container when running the container:
157
157
158
158
```
159
-
docker run -v ./custom:/opt/glassfish7/custom -p 8080:8080 -ti @docker.glassfish.repository@
159
+
docker run -v ./custom:/opt/glassfish7/custom -p 8080:8080 -ti glassfish
160
160
```
161
161
162
162
### Execute `asadmin` commands during Docker image build
@@ -168,7 +168,7 @@ To do it, simply add `RUN instructions that run `asadmin` script with the usual
168
168
File `Dockerfile`:
169
169
170
170
```
171
-
FROM @docker.glassfish.repository@
171
+
FROM glassfish
172
172
173
173
RUN printf "start-domain \n \
174
174
set configs.config.server-config.thread-pools.thread-pool.http-thread-pool.max-thread-pool-size=1000 \n \
@@ -188,7 +188,7 @@ stop-domain
188
188
File `Dockerfile`:
189
189
190
190
```
191
-
FROM @docker.glassfish.repository@
191
+
FROM glassfish
192
192
193
193
COPY commands.asadmin commands.asadmin
194
194
@@ -202,7 +202,7 @@ Let's try something more complicated.
202
202
* To modify startup arguments for GlassFish, just add `startserv` to the command line and then add any arguments supported by the `asadmin start-domain` command. The `startserv` script is an alias to the `asadmin start-domain` command but starts GlassFish in a more efficient way that is more suitable in Docker container. For example, to start in debug mode with a custom domain, run:
203
203
204
204
```bash
205
-
docker run @docker.glassfish.repository@ startserv --debug mydomain
205
+
docker run glassfish startserv --debug mydomain
206
206
```
207
207
208
208
* Environment variable `AS_TRACE=true` enables tracing of the GlassFish startup. It is useful when the server doesn't start without any useful logs.
@@ -212,13 +212,13 @@ docker run @docker.glassfish.repository@ startserv --debug mydomain
212
212
*`docker run` with `-d` starts the container as a daemon, so the shell doesn't print logs and finishes. Docker then returns the container id which you can use for further commands.
213
213
214
214
```bash
215
-
docker run -d @docker.glassfish.repository@
215
+
docker run -d glassfish
216
216
```
217
217
218
218
Example of running a Docker container in background, view the logs, and then stop it (with debug enabled, trace logging, and user `1000` convenient for Kubernetes ):
219
219
220
220
```bash
221
-
docker run -d -e AS_TRACE=true --user 1000 @docker.glassfish.repository@ startserv --debug=true
221
+
docker run -d -e AS_TRACE=true --user 1000 glassfish startserv --debug=true
0 commit comments