Container port mapping configuration
Curated, evidence-grounded skill and software-tool collections for scientific AI agents, generated by the AgenticScienceBuilder
npx -y skills add HolobiomicsLab/asb-skill-collections --skill container-port-mapping-configurationAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 14 stars14 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Use when you need to deploy a containerized web application (such as MetFrag webapp on Tomcat) and make it accessible at a specific HTTP endpoint on the host machine. Use this skill when you have a Docker image with an internal service listening on a known port (e.
The file declares its own license as CC-BY-4.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
5.9 KB, ~1.1k tokens by cl100k_base, as published. Nobody here has run it
container-port-mapping-configuration
License: restricted — no clear open-source license detected for the underlying tool; verify licensing before commercial use or redistribution. <!-- asb-license-banner -->
Summary
Configure Docker port mapping to expose containerized web services (e.g., Tomcat application servers) to a host network interface at a specified HTTP endpoint. This skill bridges the container's internal service port to an externally accessible host port, enabling network connectivity verification and downstream integration.
When to use
You need to deploy a containerized web application (such as MetFrag webapp on Tomcat) and make it accessible at a specific HTTP endpoint on the host machine. Use this skill when you have a Docker image with an internal service listening on a known port (e.g., 8080 for Tomcat) and want to expose it to a different or the same port on the host (e.g., 8888).
When NOT to use
- The application is not containerized or does not run in Docker
- You need to expose multiple services on the same host port (port conflicts)
- The container's internal service port is not known or documented
Inputs
- Docker image name and tag (e.g., ipbhalle/metfragweb)
- container internal port number (e.g., 8080)
- desired host port number (e.g., 8888)
- optional environment variables (e.g., JAVA_OPTS, WEBPREFIX)
- optional volume mount paths (e.g., settings.properties file path)
Outputs
- running Docker container instance with exposed HTTP endpoint
- HTTP endpoint URL accessible from host (e.g., http://localhost:8888/MetFragWeb)
- container startup logs confirming service readiness
- HTTP response verification (200 status or valid page content)
How to apply
Use Docker's -p (port mapping) flag in the docker run command with the syntax -p <host_port>:<container_port> to map the internal application server port to the host port. For MetFrag webapp, the container runs Tomcat internally on port 8080; map this to a host port (e.g., 8888) using -p 8888:8080. After launching the container, allow time for the application server (Tomcat) to initialize before testing. Verify HTTP connectivity by making a GET request to the exposed endpoint (e.g., http://localhost:8888/MetFragWeb) and confirm a 200 response or valid webpage content is returned. Document the container startup logs to confirm the service is ready and the endpoint is accessible.
Related tools
- Docker (container runtime and orchestration platform used to run the containerized MetFrag webapp and manage port mapping) — https://www.docker.com/
- Tomcat (embedded application server inside the container running on internal port 8080, serving the MetFrag webapp to the mapped host port) — https://hub.docker.com/_/tomcat
- MetFrag (mass spectrometry analysis webapp packaged in the Docker container and accessible via the mapped HTTP endpoint) — https://github.com/ipb-halle/MetFragRelaunched
Examples
docker run -it --rm -p 8888:8080 ipbhalle/metfragweb
Evaluation signals
- HTTP GET request to the mapped endpoint (http://localhost:<host_port>/<webapp_path>) returns HTTP 200 status code
- HTTP response contains valid HTML content or expected MetFrag webapp interface
- Docker container process remains running without errors after initialization period
- Container startup logs show Tomcat server initialized successfully and listening on the internal port
- Network connectivity is confirmed from the host machine to the container endpoint without timeout or connection refused errors
Limitations
- Port mapping requires the host port to be available and not already in use by another service
- Network connectivity may be restricted by host firewall rules; firewall configuration may be necessary for external access
- Performance and latency depend on the host system's network stack and container resource allocation
- Multiple simultaneous port mappings to the same container require distinct host port numbers
Evidence
- [readme] Docker port mapping flag and syntax specification: "docker run -it --rm -p 8888:8080 ipbhalle/metfragweb"
- [intro] Port mapping purpose and Tomcat internal port: "The MetFrag webapp is deployed by running the ipbhalle/metfragweb Docker container with port mapping (-p 8888:8080) to expose the internal Tomcat port 8080 to the host port 8888"
- [intro] Verification method via HTTP request: "Verify HTTP connectivity by making a GET request to the exposed endpoint and confirming a 200 response or valid webpage content"
- [readme] Endpoint accessibility example: "Run MetFrag at http://localhost:8888/MetFragWeb"
- [intro] Container server initialization requirement: "Wait for the Tomcat application server to initialize and the MetFrag webapp to become ready"