Skip to content
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.

Tomcat definition tweaks #24

Merged
merged 1 commit into from
Apr 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions containers/java-8-tomcat-8.5/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@

FROM tomcat:8.5-jre8

# Copy endpoint specific user settings into container to specify Java path
COPY settings.vscode.json /root/.vscode-remote/data/Machine/settings.json


# Configure apt
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"java.home": "/docker-java-home"
}
15 changes: 8 additions & 7 deletions containers/java-8-tomcat-8.5/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,14 @@ This definition includes some test code that will help you verify it is working
3. Start VS Code, press <kbd>F1</kbd>, and select **Remote-Containers: Open Folder in Container...**
4. Select the `containers/java-8-tomcat-8.5` folder.
5. After the folder has opened in the container, press <kbd>F1</kbd>, and select **Tomcat: Add Tomcat Server**.
6. In the prompted File Dialog, select `/usr/local/tomcat` and click **OK** button to add a new Tomcat Server.
7. Go to VS Code Terminal viewlet, click **+** button to new a bash terminal, then run the commands below to generate a war file.
```
cd test-project
mvn clean package
```
8. Find the war file `test-project/target/mywebapp-0.0.1-SNAPSHOT.war`, click the context menu **Debug on Tomcat Server**, then the application will be started in a Tomcat Server.
6. Select `/usr/local/tomcat` as the path and click **OK** to add a new Tomcat Server.
7. Press <kbd>ctrl</kbd>+<kbd>shift</kbd>+<kbd>`</kbd> to open a new terminal, then run the commands below to generate a war file.
```
cd test-project
mvn clean package
```
8. Navigate to `test-project/target/mywebapp-0.0.1-SNAPSHOT.war` in the explorer, right-click on the file, and select **Debug on Tomcat Server**
9. The application will then start in the Tomcat Server!

## License

Expand Down