Skip to content

Commit

Permalink
Add dockerhub information
Browse files Browse the repository at this point in the history
  • Loading branch information
whitehara committed May 4, 2023
1 parent fb0e468 commit 1f413b8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,22 @@ HTTP/2, PHP-FPM, Redis cache and Samba client enabled Nextcloud docker image
This docker image is Nextcloud image which is enabled HTTP/2, PHP-FPM, Redis cache and Samba client with small memory tweaks.

This image is used to learn how it works. If you want to get the production ready one, I recommend to use https://github.com/nextcloud/all-in-one
## How to build docker image?

## Use it from dockerhub
```
docker run -d -p 8080:80 whitehara/nextcloud-docker-http2
```
Now you can access Nextcloud at http://localhost:8080/ from your host system.

You may need to add some options for using, please see: https://github.com/nextcloud/docker
## How to build your customized docker image?
```
git clone https://github.com/whitehara/nextcloud-docker-http2 .
cd nextcloud-docker-http2
./build.sh
```
You get "nextcloud-custom" image.

## How to run the docker image
You can run this image like the normal nextcloud image.
Please see: https://github.com/nextcloud/docker

## Details
This docker image is based on three parts.
Expand Down
10 changes: 9 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,29 @@ PHP_VER=8.1
PHP_TAG=local-php:$PHP_VER-apache-zts-bullseye
PHP_DIR=./php/$PHP_VER/bullseye/apache/

# Update the repository
(cd php; git reset --hard; git pull)
# Modify Dockerfile
sed -i -e "s/\(--with-apxs2\)/\1 --enable-zts --disable-zend-signals --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data /g" $PHP_DIR/Dockerfile
# Build
docker build -t $PHP_TAG --pull --no-cache $PHP_DIR

### 2nd stage: nextcloud ###
NEXTCLOUD_VER=26
NEXTCLOUD_VER=`awk -F'.' '{print $1}' nextcloud/latest.txt`
NEXTCLOUD_TAG=local-nextcloud:$NEXTCLOUD_VER-apache-zts
NEXTCLOUD_DIR=./nextcloud/$NEXTCLOUD_VER/apache/

# Update the repository
(cd nextcloud; git reset --hard; git pull)
# Modify Dockerfile
sed -i -e "s!FROM .*!FROM $PHP_TAG!g" $NEXTCLOUD_DIR/Dockerfile
# Build
docker build -t $NEXTCLOUD_TAG $NEXTCLOUD_DIR

### 3rd stage: nextcloud-custom ###
CUSTOM_TAG=nextcloud-custom

# Modify Dockerfile
sed -i -e "s!FROM .*!FROM $NEXTCLOUD_TAG!g" ./Dockerfile
# Build
docker build -t $CUSTOM_TAG .

0 comments on commit 1f413b8

Please sign in to comment.