Sign inSign up

cabohorquez/holamundohtml-myapp

By cabohorquez

•Updated almost 2 years ago

HTML docker hello world

Image
Languages & frameworks
0

366

cabohorquez/holamundohtml-myapp repository overview

⁠Hello World HTML Docker Image

This project demonstrates a simple "Hello World" HTML page served via Apache inside a Docker container.

⁠Dockerfile

The Dockerfile uses the official Apache image (httpd:2.4), copies the index.html file to the Apache server's document root, and exposes port 80.

# Use the official Apache image from Docker Hub
FROM httpd:2.4

# Copy your HTML file to the container
COPY ./index.html /usr/local/apache2/htdocs/

# Expose port 80 for HTTP access
EXPOSE 80
⁠Docker Compose Configuration
version: '3.8'

services:
  myapp:
    build: .
    ports:
      - '80:80'
    volumes:
      - .:/usr/local/apache2/htdocs/
⁠HTML Content - index.html
<!DOCTYPE html>
<html>
<body>

<h2>HELLO WORLD Success</h2>

</body>
</html>

⁠How to Use the Docker Image

  1. Build the Docker image

    docker-compose build
    
  2. Run the Docker container

    docker-compose up
    
  3. Access the Application Open your browser and go to http://localhost. You should see the message HELLO WORLD Success displayed.

⁠Additional Notes

  • Ensure Docker and Docker Compose are installed and running.
  • The application is exposed on port 80. Adjust port mappings if needed.

Tag summary

Content type

Image

Digest

sha256:39f9d8ec8…

Size

56.6 MB

Last updated

almost 2 years ago

docker pull cabohorquez/holamundohtml-myapp