Skip to content

Commit

Permalink
Merge pull request #44 from jmhardison/v3-11
Browse files Browse the repository at this point in the history
V3 11
  • Loading branch information
jmhardison committed Oct 7, 2021
2 parents 4d5e5f2 + 82eb771 commit 1b2ea0b
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 7 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: Docker Image CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

Expand All @@ -15,4 +13,4 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Build the Docker image
run: docker build . --file Dockerfile --tag moodle:$(date +%s)
run: docker build . --file Dockerfile --tag moodle:$(date +%s)
43 changes: 43 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
on:
release:
types: [published]

jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Check out the repo
uses: actions/checkout@v2

- name: Log in to Docker Hub
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: |
jhardison/moodle
ghcr.io/${{ github.repository }}
- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ ENV SSL_PROXY false

COPY ./foreground.sh /etc/apache2/foreground.sh

RUN apt-get update && \
RUN apt-get update && apt-get upgrade -y && \
apt-get -y install mysql-client pwgen python-setuptools curl git unzip apache2 php \
php-gd libapache2-mod-php postfix wget supervisor php-pgsql curl libcurl4 \
libcurl3-dev php-curl php-xmlrpc php-intl php-mysql git-core php-xml php-mbstring php-zip php-soap cron php-ldap && \
cd /tmp && \
git clone -b MOODLE_38_STABLE git://git.moodle.org/moodle.git --depth=1 && \
git clone -b MOODLE_311_STABLE git://git.moodle.org/moodle.git --depth=1 && \
mv /tmp/moodle/* /var/www/html/ && \
rm /var/www/html/index.html && \
chown -R www-data:www-data /var/www/html && \
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ docker-moodle
=============
[![Build Status](https://dev.azure.com/jmhardison/Docker%20Moodle/_apis/build/status/jmhardison.docker-moodle?branchName=master)](https://dev.azure.com/jmhardison/Docker%20Moodle/_build/latest?definitionId=1) [![](https://images.microbadger.com/badges/image/jhardison/moodle.svg)](https://microbadger.com/images/jhardison/moodle "Get your own image badge on microbadger.com")

A Dockerfile that installs and runs the latest Moodle 3.8 stable, with external MySQL Database.
A Dockerfile that installs and runs the latest Moodle stable, with external MySQL Database.

`Note: DB Deployment uses version 5 of MySQL. MySQL:Latest is now v8.`

Tags:
* latest - 3.8 stable
* latest - 3.11 stable
* v3.11 - 3.11 stable
* v3.8 - 3.8 stable
* v3.7 - 3.7 stable
* v3.6 - 3.6 stable
Expand Down

0 comments on commit 1b2ea0b

Please sign in to comment.