Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update to last release #4

Open
wants to merge 61 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
9ab01af
Update Dockerfile
pad92 Jun 29, 2018
a6ebe65
Merge branch 'patch-2' into 'master'
pad92 Jun 29, 2018
3783a0f
cleanup
pad92 Jul 4, 2018
57c06f2
Merge branch 'patch-2'
pad92 Jul 4, 2018
1b67b0d
Merge branch 'patch-2' into 'master'
pad92 Jul 4, 2018
b56cd92
Update Dockerfile
pad92 Jul 6, 2018
0b7b3a1
Update README.md
pad92 Jul 6, 2018
b2fee3b
format and send nginx log to std(out|err)
pad92 Jul 6, 2018
7e9a6da
Merge branch 'master' of git.depad.fr:github/docker-h5ai
pad92 Jul 6, 2018
494e035
alpine:3.8 !
pad92 Jul 6, 2018
016f266
overhide mime.types package file
pad92 Jul 7, 2018
cefaa71
add md ( rfc7763 )
pad92 Jul 7, 2018
92afdfe
add label
pad92 Jul 7, 2018
a4b80cd
add HEALTHCHECK
pad92 Jul 8, 2018
e214f3e
fix labels
pad92 Jul 9, 2018
ebc5766
remove unused tags
pad92 Jul 9, 2018
ea3809c
opti
pad92 Jul 9, 2018
7ac779c
Merge branch 'master' of git.depad.fr:github/docker-h5ai
pad92 Jul 9, 2018
981bbf9
add cfg
pad92 Jul 9, 2018
36ae053
fix php7 error log
pad92 Jul 10, 2018
c479eea
Reduce memory usage/cache
pad92 Nov 20, 2018
579ded6
:zap: cleanup dependencies
pad92 Nov 20, 2018
06d31b8
Update .gitlab-ci.yml
pad92 Nov 20, 2018
939c967
add imagick
pad92 Jan 3, 2019
5c6fb1b
add missing lib
pad92 Jan 3, 2019
7711d5d
migrate to supervisord
pad92 Jan 3, 2019
32ebfd7
bump to alpine 3.9
pad92 Feb 27, 2019
4a3fc1c
:pushpin: update h5ai and alpine
pad92 Jul 29, 2019
31acf12
:whale: switch to nginx:stable-alpine
pad92 Jul 29, 2019
15144f4
:whale: set docker image version
pad92 Oct 27, 2019
8ba531e
Create LICENSE
pad92 Nov 1, 2019
4bdb526
add auth with var ENV_U and ENV_P
pad92 Jun 19, 2020
7ecb520
bump to 0.30.0
pad92 Nov 30, 2021
6e6b0cb
Create docker-publish.yml
pad92 Nov 30, 2021
1c94c5c
Merge pull request #2 from OurContainers/add-license-1
pad92 Nov 30, 2021
28ba250
cleanup
pad92 Nov 30, 2021
4208468
clean ci
pad92 Nov 30, 2021
219f003
fix: Dockerfile to reduce vulnerabilities
snyk-bot Jul 6, 2022
ff7cf3b
Merge pull request #5 from pad92/snyk-fix-27ebd0065fc524ca8288d7b2c75…
pad92 Jul 6, 2022
4a52259
Merge branch 'master' of gitlab.com:pad92/docker-h5ai
pad92 Jul 6, 2022
7e91565
bump to php8
pad92 Jul 6, 2022
1958b1d
fix badges
pad92 Jul 6, 2022
4fcf8a3
clean badges
pad92 Jul 6, 2022
0fbc433
[Snyk] Security upgrade nginx from 1.22.0-alpine to 1.22.1-alpine
pad92 Oct 21, 2022
610df17
Merge branch 'snyk-fix-4f287ea434a95a9053426643136edfc5' into 'master'
pad92 Oct 21, 2022
1151e88
update php to 8.1
pad92 May 14, 2023
6ced4d1
Merge branch 'snyk-fix-736f86150e0bdeae6e2279ad24adca74-patch-2bb9-pa…
pad92 May 14, 2023
2d5461f
fix php81
pad92 May 14, 2023
277fe9a
Update file supervisord.conf
pad92 May 14, 2023
c7928d1
update nodes and add opcache
pad92 May 22, 2023
f97dcac
Merge branch '0.30.0-3' into 'master'
pad92 May 22, 2023
d7a7ffc
Configure SAST in `.gitlab-ci.yml`, creating this file if it does not…
pad92 Jul 13, 2023
cdb3cd6
Merge branch 'set-sast-config-1' into 'master'
pad92 Jul 13, 2023
ef710eb
Configure Container Scanning in `.gitlab-ci.yml`, creating this file …
pad92 Jul 13, 2023
d174035
Merge branch 'set-container-scanning-config-1' into 'master'
pad92 Jul 13, 2023
329bf9a
build linux/arm64,linux/amd64,linux/arm/v7
pad92 Oct 3, 2023
d685c81
Merge branch 'buildx' into 'master'
pad92 Oct 3, 2023
74ea4d6
fix tag ci
pad92 Oct 3, 2023
26f658d
fix http logs
pad92 Oct 10, 2023
dedc500
Merge branch 'fix_logs' into 'master'
pad92 Oct 10, 2023
6d931e3
fix http real ip
pad92 Oct 10, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/buildx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: buildx
on:
push:
branches:
- master
jobs:
buildx:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
with:
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
tags: ${{ secrets.DOCKERHUB_USERNAME }}/h5ai:latest
push: true
129 changes: 57 additions & 72 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,102 +1,87 @@
image: docker:git

services:
- docker:dind
- docker:dind

stages:
- build_image
- tag_latest
- build_image

before_script:
- docker login -u "${CI_REGISTRY_USER}" -p "${CI_JOB_TOKEN}" "${CI_REGISTRY}"
- docker login -u "${CI_REGISTRY_USER}" -p "${CI_JOB_TOKEN}" "${CI_REGISTRY}"

###
## BUILD IMAGE
#
# Default branches (master/dev)
build_image.default:
stage: build_image
script:
- docker build --pull
--build-arg BUILD_NAME="${CI_PROJECT_NAME}"
--build-arg BUILD_DATE="$(date '+%FT%T.%s%z')"
--build-arg BUILD_VCSREF="${CI_COMMIT_SHA:0:8}"
-t "${CI_REGISTRY_IMAGE}:branch-${CI_COMMIT_REF_NAME}" .
- docker push "${CI_REGISTRY_IMAGE}:branch-${CI_COMMIT_REF_NAME}"
- docker buildx create --driver docker-container --use
- docker buildx build
--provenance=false
--pull
--build-arg BUILD_NAME="${CI_PROJECT_NAME}"
--build-arg BUILD_DATE="$(date '+%FT%T.%s%z')"
--build-arg BUILD_VCSREF="${CI_COMMIT_SHA:0:8}"
--platform=linux/arm64,linux/amd64,linux/arm/v7
--push
-t "${CI_REGISTRY_IMAGE}:${CI_COMMIT_REF_NAME}"
.
only:
- master
- dev
- master
except:
- tags
tags:
- tractor
- tags

# Issue branches (^[0-9]+-.*])
# Strip branch name branch ID
build_image.feature:
stage: build_image
script:
- docker build --pull
--build-arg BUILD_NAME="${CI_PROJECT_NAME}"
--build-arg BUILD_DATE="$(date '+%FT%T.%s%z')"
--build-arg BUILD_VCSREF="${CI_COMMIT_SHA:0:8}"
-t "${CI_REGISTRY_IMAGE}:branch-${CI_COMMIT_REF_NAME%%-*}" .
- docker push "${CI_REGISTRY_IMAGE}:branch-${CI_COMMIT_REF_NAME%%-*}"
- docker buildx create --driver docker-container --use
- docker buildx build
--provenance=false
--pull
--build-arg BUILD_NAME="${CI_PROJECT_NAME}"
--build-arg BUILD_DATE="$(date '+%FT%T.%s%z')"
--build-arg BUILD_VCSREF="${CI_COMMIT_SHA:0:8}"
--platform=linux/arm64,linux/amd64,linux/arm/v7
--push
-t "${CI_REGISTRY_IMAGE}:${CI_COMMIT_REF_NAME%%-*}"
.
only:
- /^[0-9]+-.*$/
- "/^[0-9]+-.*$/"
except:
- tags
tags:
- tractor
- tags

# Non Standard branches (^[a-zA-Z]+.*)
# Strip branch name to 128 char max
build_image.nonstd:
stage: build_image
script:
- docker build --pull
--build-arg BUILD_NAME="${CI_PROJECT_NAME}"
--build-arg BUILD_DATE="$(date '+%FT%T.%s%z')"
--build-arg BUILD_VCSREF="${CI_COMMIT_SHA:0:8}"
-t "${CI_REGISTRY_IMAGE}:branch-${CI_COMMIT_REF_NAME:0:128}" .
- docker push "${CI_REGISTRY_IMAGE}:branch-${CI_COMMIT_REF_NAME:0:128}"
- docker buildx create --driver docker-container --use
- docker buildx build
--provenance=false
--pull
--build-arg BUILD_NAME="${CI_PROJECT_NAME}"
--build-arg BUILD_DATE="$(date '+%FT%T.%s%z')"
--build-arg BUILD_VCSREF="${CI_COMMIT_SHA:0:8}"
--platform=linux/arm64,linux/amd64,linux/arm/v7
--push
-t "${CI_REGISTRY_IMAGE}:${CI_COMMIT_REF_NAME:0:128}"
.
only:
- /^[a-zA-Z]+.*$/
- "/^[a-zA-Z]+.*$/"
except:
- master
- dev
- tags
tags:
- tractor
- master
- dev
- tags

# TAGS
build_image.tag:
stage: build_image
script:
- docker build --pull
--build-arg BUILD_NAME="${CI_PROJECT_NAME}"
--build-arg BUILD_DATE="$(date '+%FT%T.%s%z')"
--build-arg BUILD_VCSREF="${CI_COMMIT_REF_NAME}"
-t "${CI_REGISTRY_IMAGE}:${CI_COMMIT_REF_NAME}" .
- docker push "${CI_REGISTRY_IMAGE}:${CI_COMMIT_REF_NAME}"
- docker buildx create --driver docker-container --use
- docker buildx build
--provenance=false
--pull
--build-arg BUILD_NAME="${CI_PROJECT_NAME}"
--build-arg BUILD_DATE="$(date '+%FT%T.%s%z')"
--build-arg BUILD_VCSREF="${CI_COMMIT_SHA:0:8}"
--platform=linux/arm64,linux/amd64,linux/arm/v7
--push
-t "${CI_REGISTRY_IMAGE}:${CI_COMMIT_REF_NAME}"
-t "${CI_REGISTRY_IMAGE}:latest"
.
only:
- tags
tags:
- tractor

###
## TAG IMAGE
#
# Tag latest on master branch
tag_image.latest:
stage: tag_latest
script:
- docker pull "${CI_REGISTRY_IMAGE}:branch-${CI_COMMIT_REF_NAME}"
- docker tag "${CI_REGISTRY_IMAGE}:branch-${CI_COMMIT_REF_NAME}" "${CI_REGISTRY_IMAGE}:latest"
- docker push "${CI_REGISTRY_IMAGE}:latest"
only:
- master
except:
- tags
tags:
- tractor
- tags
55 changes: 40 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,41 +1,66 @@
FROM node:slim as builder
FROM node:16-alpine as builder

ARG H5AI_VERSION=0.29.0
ENV H5AI_VERSION=0.30.0

RUN apt-get update \
&& apt-get --no-install-recommends -y install \
git-core \
patch \
RUN apk add --no-cache git patch \
&& git clone https://github.com/lrsjng/h5ai.git \
&& cd h5ai \
&& git checkout -b ${H5AI_VERSION} tags/v${H5AI_VERSION} \
&& npm install \
&& npm audit fix \
&& npm run build

COPY class-setup.php.patch /class-setup.php.patch
RUN patch -p1 -u -d /h5ai/build/_h5ai/private/php/core/ -i /class-setup.php.patch \
&& rm /class-setup.php.patch

FROM alpine:3.7
FROM nginx:1.25-alpine-slim

LABEL maintainer "[email protected]"
LABEL maintainer="pad92" \
org.label-schema.url="https://github.com/pad92/docker-h5ai/blob/master/README.md" \
org.label-schema.build-date=$BUILD_DATE \
org.label-schema.version=$H5AI_VERSION \
org.label-schema.vcs-url="https://github.com/pad92/docker-h5ai.git" \
org.label-schema.vcs-ref=$BUILD_VCSREF \
org.label-schema.docker.dockerfile="/Dockerfile" \
org.label-schema.description="h5ai on alpine docker image" \
org.label-schema.schema-version="1.0"

RUN apk add --no-cache \
nginx \
apache2-utils \
curl \
ffmpeg \
graphicsmagick \
php7-fpm php7-curl php7-iconv php7-xml php7-dom php7-json php7-zip php7-session php7-gd
imagemagick \
php81 \
php81-exif \
php81-fileinfo \
php81-fpm \
php81-gd \
php81-intl \
php81-json \
php81-mbstring \
php81-opcache \
php81-openssl \
php81-pecl-imagick \
php81-session \
php81-simplexml \
php81-xml \
php81-xmlwriter \
php81-zip \
supervisor \
tzdata \
zip

COPY --from=builder /h5ai/build/_h5ai /usr/share/h5ai/_h5ai

COPY slash/ /

RUN sed -i '/txt;$/ a text/plain cfg;' /etc/nginx/mime.types \
&& sed -i '/txt;$/ a text/plain ini;' /etc/nginx/mime.types \
RUN ln -sf /dev/stderr /var/log/php81/error.log \
&& ln -sf /dev/stdout /var/log/nginx/access.log \
&& ln -sf /dev/stderr /var/log/nginx/error.log \
&& chown nginx:www-data /usr/share/h5ai/_h5ai/public/cache/ \
&& chown nginx:www-data /usr/share/h5ai/_h5ai/private/cache/

EXPOSE 80

CMD ["/entrypoint.sh"]
CMD supervisord -c /etc/supervisor/conf.d/supervisord.conf
HEALTHCHECK CMD curl -I --fail http://localhost/ || exit 1
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2019 OurContainers

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,25 @@

[h5ai project](https://larsjung.de/h5ai/)

[![GitHub issues](https://img.shields.io/github/issues/pad92/docker-h5ai.svg)](https://github.com/pad92/docker-h5ai) [![Docker Automated build](https://img.shields.io/docker/automated/pad92/docker-h5ai.svg?maxAge=2592000)](https://hub.docker.com/r/pad92/docker-h5ai/) [![Docker Pulls](https://img.shields.io/docker/pulls/pad92/docker-h5ai.svg)](https://hub.docker.com/r/pad92/docker-h5ai/)

# Usage

## Commun

```
docker container run -it -p 80:80 -v $PWD/sharing-file:/share akit042/docker-h5ai
docker container run -it -p 80:80 \
-v $PWD/sharing-file:/share \
pad92/docker-h5ai
```

for overide options.json
## With custom h5ai options

For overide [options.json](https://raw.githubusercontent.com/lrsjng/h5ai/v0.29.0/src/_h5ai/private/conf/options.json) file is into `/usr/share/h5ai/_h5ai/private/conf/options.json`

```
docker container run -it -p 80:80 \
-v $PWD/sharing-file:/share \
-v $PWD/options.json:/usr/share/h5ai/_h5ai/private/conf/options.json \
akit042/docker-h5ai
pad92/docker-h5ai
```
11 changes: 11 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: '3'
services:
h5ai-devel:
build:
context: .
dockerfile: Dockerfile
image: h5ai-devel
ports:
- 8888:80
volumes:
- .:/share:ro
3 changes: 0 additions & 3 deletions slash/entrypoint.sh

This file was deleted.

Loading