Merge pull request #43 from linuxserver/size

reduce image size
This commit is contained in:
aptalca 2021-05-10 22:35:40 -04:00 committed by GitHub
commit 3055f66b6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 26 additions and 15 deletions

View File

@ -41,7 +41,9 @@ RUN \
composer install -d /app/grocy --no-dev && \
echo "**** install yarn packages ****" && \
cd /app/grocy && \
yarn && \
yarn --production && \
yarn cache clean && \
mv /app/grocy/public/node_modules /defaults/node_modules && \
echo "**** cleanup ****" && \
apk del --purge \
build-dependencies && \
@ -53,5 +55,5 @@ RUN \
COPY root/ /
# ports and volumes
EXPOSE 6781
EXPOSE 80
VOLUME /config

View File

@ -41,7 +41,9 @@ RUN \
composer install -d /app/grocy --no-dev && \
echo "**** install yarn packages ****" && \
cd /app/grocy && \
yarn && \
yarn --production && \
yarn cache clean && \
mv /app/grocy/public/node_modules /defaults/node_modules && \
echo "**** cleanup ****" && \
apk del --purge \
build-dependencies && \
@ -53,5 +55,5 @@ RUN \
COPY root/ /
# ports and volumes
EXPOSE 6781
EXPOSE 80
VOLUME /config

View File

@ -41,7 +41,9 @@ RUN \
composer install -d /app/grocy --no-dev && \
echo "**** install yarn packages ****" && \
cd /app/grocy && \
yarn && \
yarn --production && \
yarn cache clean && \
mv /app/grocy/public/node_modules /defaults/node_modules && \
echo "**** cleanup ****" && \
apk del --purge \
build-dependencies && \
@ -53,5 +55,5 @@ RUN \
COPY root/ /
# ports and volumes
EXPOSE 6781
EXPOSE 80
VOLUME /config

View File

@ -84,9 +84,9 @@ services:
environment:
- PUID=1000
- PGID=1000
- TZ=<your timezone, eg Europe/London>
- TZ=Europe/London
volumes:
- <path to data>:/config
- /path/to/data:/config
ports:
- 9283:80
restart: unless-stopped
@ -99,9 +99,9 @@ docker run -d \
--name=grocy \
-e PUID=1000 \
-e PGID=1000 \
-e TZ=<your timezone, eg Europe/London> \
-e TZ=Europe/London \
-p 9283:80 \
-v <path to data>:/config \
-v /path/to/data:/config \
--restart unless-stopped \
ghcr.io/linuxserver/grocy
```
@ -115,7 +115,7 @@ Container images are configured using parameters passed at runtime (such as thos
| `-p 80` | will map the container's port 80 to port 9283 on the host |
| `-e PUID=1000` | for UserID - see below for explanation |
| `-e PGID=1000` | for GroupID - see below for explanation |
| `-e TZ=<your timezone, eg Europe/London>` | for specifying your timezone |
| `-e TZ=Europe/London` | for specifying your timezone |
| `-v /config` | this will store any uploaded data on the docker host |
## Environment variables from files (Docker secrets)
@ -227,7 +227,8 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
## Versions
* **08.04.21:** - Update docs to reflect jenkins builder changes
* **10.05.21:** - Reduce image size.
* **08.04.21:** - Update docs to reflect jenkins builder changes.
* **17.02.21:** - Rebasing to alpine 3.13.
* **26.01.21:** - Add 'ldap' PHP extension.
* **22.12.20:** - Add 'ctype' PHP extension.

View File

@ -22,10 +22,10 @@ available_architectures:
param_container_name: "{{ project_name }}"
param_usage_include_vols: true
param_volumes:
- { vol_path: "/config", vol_host_path: "<path to data>", desc: "this will store any uploaded data on the docker host" }
- { vol_path: "/config", vol_host_path: "/path/to/data", desc: "this will store any uploaded data on the docker host" }
param_usage_include_env: true
param_env_vars:
- { env_var: "TZ", env_value: "<your timezone, eg Europe/London>", desc: "for specifying your timezone" }
- { env_var: "TZ", env_value: "Europe/London", desc: "for specifying your timezone" }
param_usage_include_ports: true
param_ports:
- { external_port: "9283", internal_port: "80", port_desc: "will map the container's port 80 to port 9283 on the host" }
@ -39,7 +39,8 @@ app_setup_block: |
# changelog
changelogs:
- { date: "08.04.21:", desc: "Update docs to reflect jenkins builder changes" }
- { date: "10.05.21:", desc: "Reduce image size." }
- { date: "08.04.21:", desc: "Update docs to reflect jenkins builder changes." }
- { date: "17.02.21:", desc: "Rebasing to alpine 3.13." }
- { date: "26.01.21:", desc: "Add 'ldap' PHP extension." }
- { date: "22.12.20:", desc: "Add 'ctype' PHP extension." }

View File

@ -12,6 +12,9 @@ i=/app/grocy/data
mv "$i" /config/"$(basename "$i")" && \
ln -s /config/"$(basename "$i")" "$i"
[[ -d /defaults/node_modules ]] && \
mv /defaults/node_modules /app/grocy/public/node_modules
# check for config file and copy default if needed
[[ ! -f "/config/data/config.php" ]] && \
cp /app/grocy/config-dist.php /config/data/config.php