Sign inSign up

xvxd4sh/apache2

By xvxd4sh

•Updated about 4 years ago

Image
0

5.1K

xvxd4sh/apache2 repository overview

⁠apache2-docker 🍂🐳

GitHub Build Status CodeQL Known Vulnerabilities

⁠Docker Image

Docker Pulls Docker Image Size (latest by date) Platforms

This is a docker project that is used to spin up an apache2 web server.

⁠Running

⁠Running with Docker

To run the xvxd4sh/apache2 image via Docker:

docker run xvxd4sh/apache2:latest
⁠Running with Docker Compose
  1. Use the docker-compose.yml file similar to the one below to use Docker Compose⁠.

    ---
    version: "3.7"
    
    # This Docker composition file is used to build and test the container
    
    secrets:
      quote_txt:
        file: ./src/secrets/quote.txt
    
    services:
      http-redirector:
        # Run the container normally
        build:
          # VERSION must be specified on the command line:
          # e.g., --build-arg VERSION=0.0.1
          context: .
          dockerfile: Dockerfile
        image: xvxd4sh/apache2:latest
        container_name: apache
        init: true
        restart: "no"
        ports:
         - '80:80'
         - '443:443'
       volumes:
         - ./src/:/var/www/html
          - ./src/config/apache2.conf:/etc/apache2/apache2.conf
          - ./src/config/000-default.conf:/etc/apache2/sites-available/000-default.conf
    
  2. Start the container and detach:

    docker compose up --detach
    

⁠Updating your container

⁠Docker Compose
  1. Pull the new image from Docker Hub:

    docker compose pull
    
  2. Recreate the running container by following the previous instructions⁠:

    docker compose up --detach
    
⁠Docker
  1. Stop the running container:

    docker stop <container_id>
    
  2. Pull the new image:

    docker pull xvxd4sh/apache2:latest
    
  3. Recreate and run the container by following the previous instructions⁠.

⁠Volumes

Mount pointPurpose
/src/webroot
/src/configconfiguration of the server

⁠Ports

The following ports are exposed by this container:

PortPurpose
80http
443https

The sample Docker composition⁠ publishes the exposed port at 80 & 443.

⁠Required

There are no required environment variables.

⁠Cross-platform builds

To create images that are compatible with other platforms, you can use the buildx⁠ feature of Docker:

  1. Copy the project to your machine using the Code button above or the command line:

    git clone https://github.com/xvxd4sh/apache2-docker.git
    cd apache2-docker
    
  2. Create the Dockerfile-x file with buildx platform support:

    ./buildx-dockerfile.sh
    
  3. Build the image using buildx:

    docker buildx build \
      --file Dockerfile-x \
      --platform linux/amd64 \
      --output type=docker \
      --tag xvxd4sh/apache2:latest.
    

⁠License

This project is in the worldwide public domain⁠.

This project is in the public domain within the United States, and copyright and related rights in the work worldwide are waived through the CC0 1.0 Universal public domain dedication⁠.

All contributions to this project will be released under the CC0 dedication. By submitting a pull request, you are agreeing to comply with this waiver of copyright interest.

Tag summary

Content type

Image

Digest

sha256:659937cc0…

Size

87 MB

Last updated

about 4 years ago

docker pull xvxd4sh/apache2