feat(): github action for build docker image
parent
1c3f239b89
commit
839454ed6b
|
@ -0,0 +1,33 @@
|
||||||
|
name: build
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-latest-tag:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
-
|
||||||
|
name: Checkout
|
||||||
|
uses: actions/checkout@v1
|
||||||
|
-
|
||||||
|
name: Set up Docker Buildx
|
||||||
|
id: buildx
|
||||||
|
uses: crazy-max/ghaction-docker-buildx@v1
|
||||||
|
with:
|
||||||
|
version: latest
|
||||||
|
-
|
||||||
|
name: Dockerhub login
|
||||||
|
env:
|
||||||
|
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
run: echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin
|
||||||
|
-
|
||||||
|
name: Run Buildx
|
||||||
|
run: |
|
||||||
|
docker buildx build \
|
||||||
|
--pull \
|
||||||
|
--push \
|
||||||
|
--platform linux/386,linux/amd64,linux/arm/v7,linux/arm64/v8 \
|
||||||
|
--tag mondedie/flarum:latest .
|
|
@ -48,6 +48,7 @@ RUN apk add --no-progress --no-cache \
|
||||||
php7-tokenizer \
|
php7-tokenizer \
|
||||||
php7-zip \
|
php7-zip \
|
||||||
php7-intl \
|
php7-intl \
|
||||||
|
php7-exif \
|
||||||
&& cd /tmp \
|
&& cd /tmp \
|
||||||
&& curl -s http://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
|
&& curl -s http://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
|
||||||
&& chmod +x /usr/local/bin/composer \
|
&& chmod +x /usr/local/bin/composer \
|
||||||
|
@ -55,10 +56,10 @@ RUN apk add --no-progress --no-cache \
|
||||||
&& mkdir -p /flarum/app \
|
&& mkdir -p /flarum/app \
|
||||||
&& COMPOSER_CACHE_DIR="/tmp" composer create-project --stability=beta --no-progress -- flarum/flarum /flarum/app $VERSION \
|
&& COMPOSER_CACHE_DIR="/tmp" composer create-project --stability=beta --no-progress -- flarum/flarum /flarum/app $VERSION \
|
||||||
&& composer clear-cache \
|
&& composer clear-cache \
|
||||||
&& rm -rf /flarum/.composer /tmp/*
|
&& rm -rf /flarum/.composer /tmp/* \
|
||||||
|
&& setcap CAP_NET_BIND_SERVICE=+eip /usr/sbin/nginx
|
||||||
|
|
||||||
COPY rootfs /
|
COPY rootfs /
|
||||||
RUN chmod +x /usr/local/bin/* /services/*/run /services/.s6-svscan/*
|
RUN chmod +x /usr/local/bin/* /services/*/run /services/.s6-svscan/*
|
||||||
RUN setcap CAP_NET_BIND_SERVICE=+eip /usr/sbin/nginx
|
|
||||||
VOLUME /flarum/app/extensions /etc/nginx/conf.d
|
VOLUME /flarum/app/extensions /etc/nginx/conf.d
|
||||||
CMD ["/usr/local/bin/startup"]
|
CMD ["/usr/local/bin/startup"]
|
||||||
|
|
19
README.md
19
README.md
|
@ -1,15 +1,10 @@
|
||||||
# mondedie/docker-flarum
|
# mondedie/flarum
|
||||||
|
|
||||||
![logo](https://i.imgur.com/Bjrtbsc.png)
|
![logo](https://i.imgur.com/Bjrtbsc.png)
|
||||||
|
|
||||||
[![](https://img.shields.io/docker/cloud/build/mondedie/docker-flarum)](https://hub.docker.com/r/mondedie/docker-flarum/builds)
|
![](https://github.com/mondediefr/docker-flarum/workflows/build/badge.svg?branch=master&event=push)
|
||||||
[![](https://img.shields.io/docker/cloud/automated/mondedie/docker-flarum)](https://hub.docker.com/r/mondedie/docker-flarum/builds)
|
[![](https://img.shields.io/docker/pulls/mondedie/flarum)](https://hub.docker.com/r/mondedie/flarum)
|
||||||
[![](https://img.shields.io/docker/pulls/mondedie/docker-flarum)](https://hub.docker.com/r/mondedie/docker-flarum)
|
[![](https://img.shields.io/docker/stars/mondedie/flarum)](https://hub.docker.com/r/mondedie/flarum)
|
||||||
[![](https://img.shields.io/docker/stars/mondedie/docker-flarum)](https://hub.docker.com/r/mondedie/docker-flarum)
|
|
||||||
|
|
||||||
### What is this ?
|
|
||||||
|
|
||||||
Simple forum software for building great communities. https://flarum.org/
|
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|
||||||
|
@ -69,10 +64,10 @@ Simple forum software for building great communities. https://flarum.org/
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Pull from hub.docker.com :
|
# Pull from hub.docker.com :
|
||||||
docker pull mondedie/docker-flarum:0.1.0-beta.11.1-stable
|
docker pull mondedie/flarum:latest
|
||||||
|
|
||||||
# or build it manually :
|
# or build it manually :
|
||||||
docker build -t mondedie/docker-flarum:latest https://github.com/mondediefr/docker-flarum.git
|
docker build -t mondedie/flarum:latest https://github.com/mondediefr/docker-flarum.git
|
||||||
```
|
```
|
||||||
|
|
||||||
#### 2 - Docker-compose.yml
|
#### 2 - Docker-compose.yml
|
||||||
|
@ -82,7 +77,7 @@ version: "3"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
flarum:
|
flarum:
|
||||||
image: mondedie/docker-flarum:0.1.0-beta.11.1-stable
|
image: mondedie/flarum:latest
|
||||||
container_name: flarum
|
container_name: flarum
|
||||||
env_file:
|
env_file:
|
||||||
- /mnt/docker/flarum/flarum.env
|
- /mnt/docker/flarum/flarum.env
|
||||||
|
|
Loading…
Reference in New Issue