├── .dockerignore ├── README.md ├── docker-entrypoint.sh ├── docker-compose.yml ├── Dockerfile └── .github └── workflows └── docker-publish.yml /.dockerignore: -------------------------------------------------------------------------------- 1 | .git 2 | .gitignore 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | :whale: Dockerfiles for [maccms10](https://github.com/magicblack/maccms10) 2 | 3 | **Run the following command:** 4 | ``` 5 | docker compose up -d 6 | ``` 7 | -------------------------------------------------------------------------------- /docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -eu 3 | 4 | if [ ! -f index.php ]; then 5 | git clone --depth 1 -q ${REPO_URL} . 6 | rm -rf .git* 7 | chmod a+rw -R application runtime upload static addons 8 | echo "maccms10 downloaded" 9 | fi 10 | 11 | if [ -f admin.php ]; then 12 | mv admin.php $ADMIN_PHP 13 | echo "admin.php => $ADMIN_PHP" 14 | fi 15 | 16 | exec "$@" 17 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.3' 2 | services: 3 | maccms: 4 | image: esme518/docker-maccms10 5 | container_name: maccms 6 | restart: always 7 | volumes: 8 | - ./data:/var/www/html 9 | ports: 10 | - 8080:80 11 | maccms-db: 12 | image: mariadb:10.3 13 | container_name: maccms-db 14 | restart: always 15 | volumes: 16 | - ./mysql:/var/lib/mysql 17 | environment: 18 | - MARIADB_ROOT_PASSWORD=maccms_db_password 19 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # 2 | # Dockerfile for MACCMS 3 | # 4 | 5 | # syntax=docker/dockerfile:1 6 | 7 | FROM php:7.4-apache 8 | 9 | COPY docker-entrypoint.sh /entrypoint.sh 10 | 11 | ENV REPO_URL https://github.com/magicblack/maccms10.git 12 | 13 | RUN set -ex \ 14 | && apt-get update && apt-get install -y \ 15 | git \ 16 | unzip \ 17 | libfreetype-dev \ 18 | libjpeg-dev \ 19 | libwebp-dev \ 20 | libzip-dev \ 21 | && docker-php-ext-install -j$(nproc) mysqli pdo_mysql sockets zip \ 22 | && docker-php-ext-configure gd \ 23 | --with-freetype \ 24 | --with-jpeg \ 25 | --with-webp \ 26 | && docker-php-ext-install -j$(nproc) gd \ 27 | && apt-get autoremove -y \ 28 | && apt-get clean \ 29 | && rm -rf /tmp/* /var/lib/apt/lists/* 30 | 31 | RUN set -ex \ 32 | && mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" \ 33 | && a2enmod remoteip \ 34 | && sed -i 's/%h/%a/g' /etc/apache2/apache2.conf \ 35 | && echo "ServerName localhost" >> /etc/apache2/apache2.conf 36 | 37 | COPY </ 17 | IMAGE_NAME: ${{ github.repository }} 18 | 19 | jobs: 20 | workflow-keepalive: 21 | if: github.event_name == 'schedule' 22 | runs-on: ubuntu-latest 23 | permissions: 24 | actions: write 25 | steps: 26 | - uses: liskin/gh-workflow-keepalive@v1 27 | 28 | build-arm64-image: 29 | 30 | runs-on: ubuntu-24.04-arm 31 | permissions: 32 | contents: read 33 | packages: write 34 | # This is used to complete the identity challenge 35 | # with sigstore/fulcio when running outside of PRs. 36 | id-token: write 37 | 38 | steps: 39 | - name: Checkout repository 40 | uses: actions/checkout@v4 41 | 42 | - name: Set up QEMU 43 | uses: docker/setup-qemu-action@v3 44 | 45 | # Workaround: https://github.com/docker/build-push-action/issues/461 46 | - name: Setup Docker buildx 47 | uses: docker/setup-buildx-action@v3 48 | 49 | # Login against a Docker registry except on PR 50 | # https://github.com/docker/login-action 51 | - name: Log into registry ${{ env.REGISTRY }} 52 | if: github.event_name != 'pull_request' 53 | uses: docker/login-action@v3 54 | with: 55 | registry: ${{ env.REGISTRY }} 56 | username: ${{ secrets.DOCKER_HUB_USER }} 57 | password: ${{ secrets.DOCKER_HUB_TOKEN }} 58 | 59 | # Extract metadata (tags, labels) for Docker 60 | # https://github.com/docker/metadata-action 61 | - name: Extract Docker metadata 62 | id: meta 63 | uses: docker/metadata-action@v5 64 | with: 65 | images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} 66 | tags: | 67 | type=raw,value=latest-arm64 68 | 69 | # Build and push Docker image with Buildx (don't push on PR) 70 | # https://github.com/docker/build-push-action 71 | - name: Build and push Docker image 72 | id: build-and-push 73 | uses: docker/build-push-action@v6 74 | with: 75 | context: . 76 | platforms: linux/arm64 77 | provenance: false 78 | sbom: false 79 | push: ${{ github.event_name != 'pull_request' }} 80 | tags: ${{ steps.meta.outputs.tags }} 81 | labels: ${{ steps.meta.outputs.labels }} 82 | 83 | build-amd64-image: 84 | 85 | runs-on: ubuntu-24.04 86 | permissions: 87 | contents: read 88 | packages: write 89 | # This is used to complete the identity challenge 90 | # with sigstore/fulcio when running outside of PRs. 91 | id-token: write 92 | 93 | steps: 94 | - name: Checkout repository 95 | uses: actions/checkout@v4 96 | 97 | - name: Set up QEMU 98 | uses: docker/setup-qemu-action@v3 99 | 100 | # Workaround: https://github.com/docker/build-push-action/issues/461 101 | - name: Setup Docker buildx 102 | uses: docker/setup-buildx-action@v3 103 | 104 | # Login against a Docker registry except on PR 105 | # https://github.com/docker/login-action 106 | - name: Log into registry ${{ env.REGISTRY }} 107 | if: github.event_name != 'pull_request' 108 | uses: docker/login-action@v3 109 | with: 110 | registry: ${{ env.REGISTRY }} 111 | username: ${{ secrets.DOCKER_HUB_USER }} 112 | password: ${{ secrets.DOCKER_HUB_TOKEN }} 113 | 114 | # Extract metadata (tags, labels) for Docker 115 | # https://github.com/docker/metadata-action 116 | - name: Extract Docker metadata 117 | id: meta 118 | uses: docker/metadata-action@v5 119 | with: 120 | images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} 121 | tags: | 122 | type=raw,value=latest-amd64 123 | 124 | # Build and push Docker image with Buildx (don't push on PR) 125 | # https://github.com/docker/build-push-action 126 | - name: Build and push Docker image 127 | id: build-and-push 128 | uses: docker/build-push-action@v6 129 | with: 130 | context: . 131 | platforms: linux/amd64 132 | provenance: false 133 | sbom: false 134 | push: ${{ github.event_name != 'pull_request' }} 135 | tags: ${{ steps.meta.outputs.tags }} 136 | labels: ${{ steps.meta.outputs.labels }} 137 | 138 | combine-images: 139 | 140 | runs-on: ubuntu-24.04 141 | needs: 142 | - build-arm64-image 143 | - build-amd64-image 144 | permissions: 145 | contents: read 146 | packages: write 147 | # This is used to complete the identity challenge 148 | # with sigstore/fulcio when running outside of PRs. 149 | id-token: write 150 | 151 | steps: 152 | # Login against a Docker registry except on PR 153 | # https://github.com/docker/login-action 154 | - name: Log into registry ${{ env.REGISTRY }} 155 | if: github.event_name != 'pull_request' 156 | uses: docker/login-action@v3 157 | with: 158 | registry: ${{ env.REGISTRY }} 159 | username: ${{ secrets.DOCKER_HUB_USER }} 160 | password: ${{ secrets.DOCKER_HUB_TOKEN }} 161 | 162 | - name: Create and push manifest images [latest] 163 | uses: Noelware/docker-manifest-action@0.4.3 164 | with: 165 | inputs: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest 166 | images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest-arm64,${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest-amd64 167 | push: true 168 | --------------------------------------------------------------------------------