From 3b2324f1ae41585f23038d14537fe6a0cb8cde40 Mon Sep 17 00:00:00 2001 From: Mister_X Date: Sun, 6 Apr 2025 15:01:51 +0200 Subject: capitalize docker readme filename --- docker/README.md | 215 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ docker/Readme.md | 215 ------------------------------------------------------- 2 files changed, 215 insertions(+), 215 deletions(-) create mode 100644 docker/README.md delete mode 100644 docker/Readme.md (limited to 'docker') diff --git a/docker/README.md b/docker/README.md new file mode 100644 index 000000000..8a63637b3 --- /dev/null +++ b/docker/README.md @@ -0,0 +1,215 @@ +# Yacy Docker image from latest sources + +## Supported tags + +* `latest` (Latest stable release) +* `latest-alpine` (Latest stable release based on Alpine Linux) +* `` (Lock on a specific/minor/major version, e.g., `1.2.3`, `1.2`, `1`) +* `-alpine` (e.g., `1.2.3-alpine`) +* `` (e.g., `master` for the latest commit of branches) +* `pr-` (e.g., `pr-42` for pull requests) + +For a detailed explanation of supported tags, refer to [DockerImageTags.md](./DockerImageTags.md). + +## Getting built image from Docker Hub and GitHub Container Registry + +The repository URLs are: + +* Docker Hub: +* GitHub Container Registry: `ghcr.io/yacy/yacy_search_server` + +Examples: + +* `docker pull yacy/yacy_search_server:latest` +* `docker pull ghcr.io/yacy/yacy_search_server:latest` +* `docker pull ghcr.io/yacy/yacy_search_server:latest-alpine` +* `docker pull ghcr.io/yacy/yacy_search_server:1.2.3` +* `docker pull ghcr.io/yacy/yacy_search_server:master` +* `docker pull ghcr.io/yacy/yacy_search_server:pr-42` + +## Building image yourself + +Using files in 'yacy_search_server/docker/': + +```sh +cd yacy_search_server/docker +``` + +Then according to the image type: + +* `yacy/yacy_search_server:latest`: This image is based on the latest stable official [Eclipse Temurin](https://hub.docker.com/_/eclipse-temurin) 21 release. It includes YaCy compiled from the latest git repository sources. +* `yacy/yacy_search_server:latest-alpine`: This image is based on the latest stable [Eclipse Temurin](https://hub.docker.com/_/eclipse-temurin) 21 release with Alpine Linux as the base. It also includes YaCy compiled from the latest git repository sources. + +```sh +docker build -t yacy/yacy_search_server:latest -f Dockerfile ../ +``` + +## Usage + +### Run the Docker image directly + +You can run the YaCy Docker image directly using the following command: + +```sh +docker run -d --name yacy -p 8090:8090 -p 8443:8443 -v yacy_data:/opt/yacy_search_server/DATA --log-opt max-size=200m --log-opt max-file=2 yacy/yacy_search_server:latest +``` + +### Using Docker Compose + +You can also use Docker Compose to run the YaCy container. Create a `docker-compose.yml` file with the following content: + +```yaml +services: + yacy: + container_name: yacy + image: yacy/yacy_search_server:latest + restart: unless-stopped + ports: + - "8090:8090" + - "8443:8443" + volumes: + - yacy_data:/opt/yacy_search_server/DATA + logging: + options: + max-size: "200m" + max-file: "2" + +volumes: + yacy_data: +``` + +Then start the container with: + +```sh +docker-compose up -d +``` + +YaCy web interface is then exposed at `http://[container_ip]:8090` +You can retrieve the container IP address with `docker inspect`. + +### Default admin account + +* login: admin +* password: yacy + +You should modify this default password with page /ConfigAccounts_p.html when exposing publicly your YaCy container. + +### Handle persistent data volume + +As configured in the Dockerfile, by default YaCy data (in /opt/yacy_search_server/DATA) will persist after container stop or deletion, in a volume named "yacy_data". + +### HTTPS support + +This images are default configured with HTTPS enabled, and use a default certificate stored in defaults/freeworldKeystore. You should use your own certificate. In order to do it, you can proceed as follow. + +#### Self-signed certificate + +A self-signed certificate will provide encrypted communications with your YaCy server, but browsers will still complain about an invalid security certificate with the error "SEC_ERROR_UNKNOWN_ISSUER". If it is sufficient for you, you can permanently add an exception to your browser. + +This kind of certificate can be generated and added to your YaCy Docker container with the following: + +```sh +keytool -keystore /var/lib/docker/volumes/[your_yacy_volume]/_data/SETTINGS/yacykeystore -genkey -keyalg RSA -alias yacycert +``` + +Then edit YaCy config file. For example, with the nano text editor: + +```sh +nano /var/lib/docker/volumes/[your_yacy_volume]/_data/SETTINGS/yacy.conf +``` + +And configure the keyStoreXXXX properties accordingly: + +```sh +keyStore=/opt/yacy_search_server/DATA/SETTINGS/yacykeystore +keyStorePassword=yourpassword +``` + +#### Import an existing certificate + +Importing a certificate validated by a certification authority (CA) will ensure you have full HTTPS support with no security errors when accessing your YaCy peer. You can import an existing certificate in pkcs12 format. + +First copy it to the YaCy Docker container volume: + +```sh +cp [yourStore].pkcs12 /var/lib/docker/volumes/[your_yacy_volume]/_data/SETTINGS/[yourStore].pkcs12 +``` + +Then edit YaCy config file. For example, with the nano text editor: + +```sh +nano /var/lib/docker/volumes/[your_yacy_volume]/_data/SETTINGS/yacy.conf +``` + +And configure the pkcs12XXX properties accordingly: + +```sh +pkcs12ImportFile=/opt/yacy_search_server/DATA/SETTINGS/[yourStore].pkcs12 +pkcs12ImportPwd=yourpassword +``` + +### Next starts + +#### As attached process + +```sh +docker start -a yacy +``` + +#### As background process + +```sh +docker start yacy +``` + +### Shutdown + +* Use "Shutdown" button in administration web interface +* OR run: + +```sh +docker exec yacy /opt/yacy_search_server/stopYACY.sh +``` + +* OR run: + +```sh +docker stop yacy +``` + +### Upgrade + +To upgrade your YaCy container, follow these steps: + +1. Pull the latest Docker image: + + ```sh + docker pull yacy/yacy_search_server:latest + ``` + +2. Stop and remove the old container: + + ```sh + docker stop yacy + docker rm yacy + ``` + +3. Run the new container using the same command as before: + + ```sh + docker run -d --name yacy -p 8090:8090 -p 8443:8443 -v yacy_data:/opt/yacy_search_server/DATA --log-opt max-size=200m --log-opt max-file=2 yacy/yacy_search_server:latest + ``` + +#### Update Docker Compose Images + +To update the images created with the Docker Compose file, you can use the following command: + +```sh +docker-compose up -d --force-recreate --pull always +``` + +This command ensures that the latest images are pulled and the containers are recreated with the updated images. + +## License + +View [license](https://github.com/yacy/yacy_search_server/blob/master/COPYRIGHT) information for the software contained in this image. diff --git a/docker/Readme.md b/docker/Readme.md deleted file mode 100644 index 8a63637b3..000000000 --- a/docker/Readme.md +++ /dev/null @@ -1,215 +0,0 @@ -# Yacy Docker image from latest sources - -## Supported tags - -* `latest` (Latest stable release) -* `latest-alpine` (Latest stable release based on Alpine Linux) -* `` (Lock on a specific/minor/major version, e.g., `1.2.3`, `1.2`, `1`) -* `-alpine` (e.g., `1.2.3-alpine`) -* `` (e.g., `master` for the latest commit of branches) -* `pr-` (e.g., `pr-42` for pull requests) - -For a detailed explanation of supported tags, refer to [DockerImageTags.md](./DockerImageTags.md). - -## Getting built image from Docker Hub and GitHub Container Registry - -The repository URLs are: - -* Docker Hub: -* GitHub Container Registry: `ghcr.io/yacy/yacy_search_server` - -Examples: - -* `docker pull yacy/yacy_search_server:latest` -* `docker pull ghcr.io/yacy/yacy_search_server:latest` -* `docker pull ghcr.io/yacy/yacy_search_server:latest-alpine` -* `docker pull ghcr.io/yacy/yacy_search_server:1.2.3` -* `docker pull ghcr.io/yacy/yacy_search_server:master` -* `docker pull ghcr.io/yacy/yacy_search_server:pr-42` - -## Building image yourself - -Using files in 'yacy_search_server/docker/': - -```sh -cd yacy_search_server/docker -``` - -Then according to the image type: - -* `yacy/yacy_search_server:latest`: This image is based on the latest stable official [Eclipse Temurin](https://hub.docker.com/_/eclipse-temurin) 21 release. It includes YaCy compiled from the latest git repository sources. -* `yacy/yacy_search_server:latest-alpine`: This image is based on the latest stable [Eclipse Temurin](https://hub.docker.com/_/eclipse-temurin) 21 release with Alpine Linux as the base. It also includes YaCy compiled from the latest git repository sources. - -```sh -docker build -t yacy/yacy_search_server:latest -f Dockerfile ../ -``` - -## Usage - -### Run the Docker image directly - -You can run the YaCy Docker image directly using the following command: - -```sh -docker run -d --name yacy -p 8090:8090 -p 8443:8443 -v yacy_data:/opt/yacy_search_server/DATA --log-opt max-size=200m --log-opt max-file=2 yacy/yacy_search_server:latest -``` - -### Using Docker Compose - -You can also use Docker Compose to run the YaCy container. Create a `docker-compose.yml` file with the following content: - -```yaml -services: - yacy: - container_name: yacy - image: yacy/yacy_search_server:latest - restart: unless-stopped - ports: - - "8090:8090" - - "8443:8443" - volumes: - - yacy_data:/opt/yacy_search_server/DATA - logging: - options: - max-size: "200m" - max-file: "2" - -volumes: - yacy_data: -``` - -Then start the container with: - -```sh -docker-compose up -d -``` - -YaCy web interface is then exposed at `http://[container_ip]:8090` -You can retrieve the container IP address with `docker inspect`. - -### Default admin account - -* login: admin -* password: yacy - -You should modify this default password with page /ConfigAccounts_p.html when exposing publicly your YaCy container. - -### Handle persistent data volume - -As configured in the Dockerfile, by default YaCy data (in /opt/yacy_search_server/DATA) will persist after container stop or deletion, in a volume named "yacy_data". - -### HTTPS support - -This images are default configured with HTTPS enabled, and use a default certificate stored in defaults/freeworldKeystore. You should use your own certificate. In order to do it, you can proceed as follow. - -#### Self-signed certificate - -A self-signed certificate will provide encrypted communications with your YaCy server, but browsers will still complain about an invalid security certificate with the error "SEC_ERROR_UNKNOWN_ISSUER". If it is sufficient for you, you can permanently add an exception to your browser. - -This kind of certificate can be generated and added to your YaCy Docker container with the following: - -```sh -keytool -keystore /var/lib/docker/volumes/[your_yacy_volume]/_data/SETTINGS/yacykeystore -genkey -keyalg RSA -alias yacycert -``` - -Then edit YaCy config file. For example, with the nano text editor: - -```sh -nano /var/lib/docker/volumes/[your_yacy_volume]/_data/SETTINGS/yacy.conf -``` - -And configure the keyStoreXXXX properties accordingly: - -```sh -keyStore=/opt/yacy_search_server/DATA/SETTINGS/yacykeystore -keyStorePassword=yourpassword -``` - -#### Import an existing certificate - -Importing a certificate validated by a certification authority (CA) will ensure you have full HTTPS support with no security errors when accessing your YaCy peer. You can import an existing certificate in pkcs12 format. - -First copy it to the YaCy Docker container volume: - -```sh -cp [yourStore].pkcs12 /var/lib/docker/volumes/[your_yacy_volume]/_data/SETTINGS/[yourStore].pkcs12 -``` - -Then edit YaCy config file. For example, with the nano text editor: - -```sh -nano /var/lib/docker/volumes/[your_yacy_volume]/_data/SETTINGS/yacy.conf -``` - -And configure the pkcs12XXX properties accordingly: - -```sh -pkcs12ImportFile=/opt/yacy_search_server/DATA/SETTINGS/[yourStore].pkcs12 -pkcs12ImportPwd=yourpassword -``` - -### Next starts - -#### As attached process - -```sh -docker start -a yacy -``` - -#### As background process - -```sh -docker start yacy -``` - -### Shutdown - -* Use "Shutdown" button in administration web interface -* OR run: - -```sh -docker exec yacy /opt/yacy_search_server/stopYACY.sh -``` - -* OR run: - -```sh -docker stop yacy -``` - -### Upgrade - -To upgrade your YaCy container, follow these steps: - -1. Pull the latest Docker image: - - ```sh - docker pull yacy/yacy_search_server:latest - ``` - -2. Stop and remove the old container: - - ```sh - docker stop yacy - docker rm yacy - ``` - -3. Run the new container using the same command as before: - - ```sh - docker run -d --name yacy -p 8090:8090 -p 8443:8443 -v yacy_data:/opt/yacy_search_server/DATA --log-opt max-size=200m --log-opt max-file=2 yacy/yacy_search_server:latest - ``` - -#### Update Docker Compose Images - -To update the images created with the Docker Compose file, you can use the following command: - -```sh -docker-compose up -d --force-recreate --pull always -``` - -This command ensures that the latest images are pulled and the containers are recreated with the updated images. - -## License - -View [license](https://github.com/yacy/yacy_search_server/blob/master/COPYRIGHT) information for the software contained in this image. -- cgit v1.2.3