mirror of
https://github.com/imtbl/hydrus-server-docker
synced 2024-09-29 08:51:37 +13:00
Merge branch 'release/3.23.0'
This commit is contained in:
commit
92a8789ad5
5 changed files with 36 additions and 42 deletions
10
CHANGELOG.md
10
CHANGELOG.md
|
@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
## [3.23.0] - 2020-01-12
|
||||
|
||||
### Removed
|
||||
|
||||
+ Removed the ability to define custom UID and GID for the Docker container at
|
||||
container creation due to several issues arising from that
|
||||
|
||||
## [3.22.0] - 2020-01-05
|
||||
|
||||
### Added
|
||||
|
@ -315,7 +322,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|||
|
||||
+ Initial release
|
||||
|
||||
[Unreleased]: https://github.com/mserajnik/hydrus-server-docker/compare/3.22.0...develop
|
||||
[Unreleased]: https://github.com/mserajnik/hydrus-server-docker/compare/3.23.0...develop
|
||||
[3.23.0]: https://github.com/mserajnik/hydrus-server-docker/compare/3.22.0...3.23.0
|
||||
[3.22.0]: https://github.com/mserajnik/hydrus-server-docker/compare/3.21.0...3.22.0
|
||||
[3.21.0]: https://github.com/mserajnik/hydrus-server-docker/compare/3.20.0...3.21.0
|
||||
[3.20.0]: https://github.com/mserajnik/hydrus-server-docker/compare/3.19.0...3.20.0
|
||||
|
|
32
Dockerfile
32
Dockerfile
|
@ -1,16 +1,18 @@
|
|||
FROM python:3.8-slim-buster
|
||||
|
||||
ARG USER_ID=1000
|
||||
ARG GROUP_ID=1000
|
||||
|
||||
ENV \
|
||||
USER_ID=$USER_ID \
|
||||
GROUP_ID=$GROUP_ID
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
COPY ./hydrus .
|
||||
COPY ./deb .
|
||||
|
||||
RUN \
|
||||
chmod +x \
|
||||
server.py \
|
||||
bin/swfrender_linux \
|
||||
bin/upnpc_linux && \
|
||||
mkdir /data && \
|
||||
apt-get update && apt-get install --no-install-recommends -y \
|
||||
build-essential \
|
||||
ffmpeg \
|
||||
|
@ -41,13 +43,16 @@ RUN \
|
|||
rm -r ~/.cache && \
|
||||
apt-get remove build-essential --purge -y && \
|
||||
apt-get clean && apt-get autoremove --purge -y && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
chown -R ${USER_ID}:${GROUP_ID} /usr/src/app && \
|
||||
chmod +x \
|
||||
server.py \
|
||||
bin/swfrender_linux \
|
||||
bin/upnpc_linux && \
|
||||
mkdir /data && chown -R ${USER_ID}:${GROUP_ID} /data
|
||||
|
||||
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint
|
||||
COPY docker-start.sh /usr/local/bin/docker-start
|
||||
RUN \
|
||||
chmod +x /usr/local/bin/docker-entrypoint && \
|
||||
chmod +x /usr/local/bin/docker-start
|
||||
COPY docker-cmd-start.sh /usr/local/bin/start
|
||||
RUN chmod +x /usr/local/bin/start
|
||||
|
||||
EXPOSE 45870/tcp 45871/tcp 45872/tcp
|
||||
|
||||
|
@ -57,5 +62,6 @@ HEALTHCHECK --interval=1m --timeout=10s --retries=3 \
|
|||
|
||||
VOLUME /data
|
||||
|
||||
ENTRYPOINT ["docker-entrypoint"]
|
||||
CMD ["docker-start"]
|
||||
USER ${USER_ID}:${GROUP_ID}
|
||||
|
||||
CMD ["start"]
|
||||
|
|
26
README.md
26
README.md
|
@ -17,7 +17,6 @@ The latest build runs [hydrus server version 379][hydrus-server-version].
|
|||
+ [Usage](#usage)
|
||||
+ [Ports](#ports)
|
||||
+ [Storage](#storage)
|
||||
+ [UID/GID](#uidgid)
|
||||
+ [Donate](#donate)
|
||||
+ [Maintainer](#maintainer)
|
||||
+ [Contribute](#contribute)
|
||||
|
@ -38,9 +37,7 @@ specific version of hydrus server, provide the version number as tag, e.g.:
|
|||
user@local:~$ docker pull mserajnik/hydrus-server-docker:379
|
||||
```
|
||||
|
||||
See [here][docker-hub-tags] for all the available version numbers/tags.
|
||||
|
||||
Alternatively, you can clone this repository and build the image yourself:
|
||||
Alternatively, you can also build the image yourself:
|
||||
|
||||
```zsh
|
||||
user@local:~$ git clone --recurse-submodules https://github.com/mserajnik/hydrus-server-docker.git
|
||||
|
@ -48,6 +45,10 @@ user@local:~$ cd hydrus-server-docker
|
|||
user@local:hydrus-server-docker$ docker build . -t hydrus-server-docker
|
||||
```
|
||||
|
||||
The user that is used inside the container has UID `1000` and GID `1000` by
|
||||
default. You can adjust this (e.g., to match your host UID/GID) by providing
|
||||
the arguments `USER_ID` and `GROUP_ID` when making a build.
|
||||
|
||||
### Dependencies
|
||||
|
||||
+ [Docker][docker]
|
||||
|
@ -118,22 +119,11 @@ mount that over it:
|
|||
user@local:~$ docker volume create hydrus-server-data
|
||||
```
|
||||
|
||||
### UID/GID
|
||||
|
||||
The user that owns the data and runs the server inside the container has the
|
||||
UID `1000` and the GID `1000` by default. You can change these by providing the
|
||||
environment variables `CUSTOM_UID` and `CUSTOM_GID` when creating a container.
|
||||
|
||||
This is useful if you want to access the data outside the container with a user
|
||||
with different IDs without hassle. In such a case, `CUSTOM_UID` and
|
||||
`CUSTOM_GID` should match the user that is going to access the data on the
|
||||
host.
|
||||
|
||||
Here is a full example for running the container with all the options mentioned
|
||||
above:
|
||||
After creating your named volume, you can run the container. Here is a full
|
||||
example with all the options mentioned above:
|
||||
|
||||
```zsh
|
||||
user@local:~$ docker run -p 45870:45870 -p 45871:45871 -p 45872:45872 -v hydrus-server-data:/data -e CUSTOM_UID=1000 -e CUSTOM_GID=1000 -d mserajnik/hydrus-server-docker
|
||||
user@local:~$ docker run -p 45870:45870 -p 45871:45871 -p 45872:45872 -v hydrus-server-data:/data -d mserajnik/hydrus-server-docker
|
||||
```
|
||||
|
||||
Specifying the same named volume every time a container is created gives each
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
USER_ID=${CUSTOM_UID:-1000}
|
||||
GROUP_ID=${CUSTOM_GID:-1000}
|
||||
|
||||
echo "Setting permissions to UID/GID ${USER_ID}/${GROUP_ID}."
|
||||
chown ${USER_ID}:${GROUP_ID} -R /usr/src/app
|
||||
chown ${USER_ID}:${GROUP_ID} -R /data
|
||||
|
||||
exec gosu ${USER_ID}:${GROUP_ID} "$@"
|
Loading…
Reference in a new issue