Giter VIP home page Giter VIP logo

docker-openfire's Introduction

gizmotronic/openfire:4.4.4

Introduction

Dockerfile to create a Docker container image for Openfire.

Openfire is a real time collaboration (RTC) server licensed under the Open Source Apache License. It uses the only widely adopted open protocol for instant messaging, XMPP (also called Jabber). Openfire is incredibly easy to setup and administer, but offers rock-solid security and performance.

Due to Oracle Java license changes, this image is built exclusively using OpenJDK starting with Openfire 4.3.2. This project is otherwise almost entirely identical to sameersbn/openfire.

Contributing

If you find this image useful here's how you can help:

  • Send a pull request with your awesome features and bug fixes
  • Help users resolve their issues.
  • Support the development of this image with a donation

Known issues

Openfire setup fails to save configuration

Insufficient input validation in the Openfire setup process can cause failures when saving the configuration file, even when the built-in tests run successfully.

Openfire doesn't write logs to the normal location

Openfire 4.3 and later use Log4j 2, which uses a new configuration file. Please make sure you include a log4j2.xml file in your configuration directory, and use the newest 4.3 or 4.4 image available on Docker Hub.

Other issues

Before reporting a bug please try updating Docker to the latest version and check if it resolves the issue. Refer to the Docker installation guide for instructions.

SELinux users should try disabling SELinux using the command setenforce 0 to see if it resolves the issue.

If the above recommendations do not help then report your issue along with the following information:

  • Output of the docker version and docker info commands
  • The docker run command or docker-compose.yml used to start the image. Mask out the sensitive bits.
  • Please state if you are using Boot2Docker, VirtualBox, etc.

Getting started

Installation

Automated builds of the image are available on Dockerhub and is the recommended method of installation.

docker pull gizmotronic/openfire:4.4.4

Alternatively you can build the image yourself.

docker build -t gizmotronic/openfire github.com/gizmotronic/docker-openfire

Quickstart

Start Openfire using:

docker run --name openfire -d --restart=always \
  --publish 9090:9090 --publish 5222:5222 --publish 7777:7777 \
  --volume /srv/docker/openfire:/var/lib/openfire \
  gizmotronic/openfire:4.4.4

Alternatively, you can use the sample docker-compose.yml file to start the container using Docker Compose

Point your browser to http://localhost:9090 and follow the setup procedure to complete the installation. The Build A Free Jabber Server In 10 Minutes video by HAKK5 should help you with the configuration and also introduce you to some of its features.

Persistence

For the Openfire to preserve its state across container shutdown and startup you should mount a volume at /var/lib/openfire.

The Quickstart command already mounts a volume for persistence.

SELinux users should update the security context of the host mountpoint so that it plays nicely with Docker:

mkdir -p /srv/docker/openfire
chcon -Rt svirt_sandbox_file_t /srv/docker/openfire

Java VM options

You may append options to the startup command to configure the JVM:

docker run -name openfire -d \
  [DOCKER_OPTIONS] \
  gizmotronic/openfire:4.4.4 \
  -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode

Logs

To access the Openfire logs, located at /var/log/openfire, you can use docker exec. For example, if you want to tail the logs:

docker exec -it openfire tail -f /var/log/openfire/info.log

Maintenance

Upgrading

To upgrade to newer releases:

  1. Download the updated Docker image:
docker pull gizmotronic/openfire:4.4.4
  1. Stop the currently running image:
docker stop openfire
  1. Remove the stopped container
docker rm -v openfire
  1. Start the updated image
docker run -name openfire -d \
  [OPTIONS] \
  gizmotronic/openfire:4.4.4

Shell Access

For debugging and maintenance purposes you may want access the containers shell. If you are using Docker version 1.3.0 or higher you can access a running containers shell by starting bash using docker exec:

docker exec -it openfire bash

References

docker-openfire's People

Contributors

gizmotronic avatar lordfpl avatar miguelwill avatar paimpozhil avatar solidnerd avatar srplexus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

docker-openfire's Issues

Sameersbn/Openfire

Hi,
I'm new to docker implementations.
However, I've been using Sameer's implementation on my Synology Container. I see that your's is much more updated. Is there a way to replace Sameer's docker image with all it's settings to yours?

Sorry if this is so basic. But, as I mentioned, I'm very new to images.
Thanks,
Gus

How to upgrade openfire version 4.4.0

Hi, I couldn't upgrade it on my own computer. The error I received is as follows.

$ make
... (bla bla)
Downloading openfire_4.4.0_all.deb ...
2019-07-05 14:12:36 URL:https://github-production-release-asset-2e65be.s3.amazonaws.com/18511687/6032f680-998a-11e9-9808-941a326f287d?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20190705%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20190705T141134Z&X-Amz-Expires=300&X-Amz-Signature=7a71ae6a0c6a533910912c67eb8c546f72926857066c082f071a93e950f64116&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dopenfire_4.4.0_all.deb&response-content-type=application%2Foctet-stream [37074646/37074646] -> "/tmp/openfire_4.4.0_all.deb" [1]
Selecting previously unselected package openfire.
dpkg: regarding /tmp/openfire_4.4.0_all.deb containing openfire, pre-dependency problem:
 openfire pre-depends on default-jre-headless (>= 1.8) | java8-runtime-headless | java8-runtime | java9-runtime-headless | java9-runtime
  default-jre-headless is not installed.
  java8-runtime-headless is not installed.
  java8-runtime is not installed.
  java9-runtime-headless is not installed.
  java9-runtime is not installed.

dpkg: error processing archive /tmp/openfire_4.4.0_all.deb (--install):
 pre-dependency problem - not installing openfire
Errors were encountered while processing:
 /tmp/openfire_4.4.0_all.deb
The command '/bin/sh -c apt-get update  && DEBIAN_FRONTEND=noninteractive apt-get install -y sudo wget  && echo "Downloading openfire_${OPENFIRE_VERSION}_all.deb ..."  && wget --no-verbose "http://download.igniterealtime.org/openfire/openfire_${OPENFIRE_VERSION}_all.deb" -O /tmp/openfire_${OPENFIRE_VERSION}_all.deb  && dpkg -i /tmp/openfire_${OPENFIRE_VERSION}_all.deb  && mv /var/lib/openfire/plugins/admin /usr/share/openfire/plugin-admin  && rm -rf openfire_${OPENFIRE_VERSION}_all.deb  && rm -rf /var/lib/apt/lists/*' returned a non-zero code: 1
make: *** [build] Error 1

All log file

Error response manifest unknown

Hello, when I pull openfire:4.8.0 and try to start the container, I get this error: Error response from daemon: manifest for nasqueron/openfire:4.8.0 not found: manifest unknown: manifest unknown

Thank you!

No logs in OPENFIRE_LOG_DIR and error "No Log4j 2 configuration file found"

We are currently trying to debug a login/connection issue of an automated XMPP client (Jenkins) with our dockerized Openfire server running with your image "gizmotronic/openfire" and default folders.

The problem is there aren't any logs apart from docker [CONTAINER_NAME] logs, neither in the admin console
no_logs
nor under /usr/share/openfire/logs or under /var/log/openfire/

And the docker logs of the instance contain the following error
ERROR StatusLogger No Log4j 2 configuration file found. Using default configuration (logging only errors to the console), or user programmatically provided configurations. Set system property 'log4j2.debug' to show Log4j 2 internal initialization logging. See https://logging.apache.org/log4j/2.x/manual/configuration.html for instructions on how to configure Log4j 2

Can this be a result of the function rewire_openfire() in entrypoint.sh?
Also, there are actually 2 log4j2.xml in the container
/usr/share/openfire/lib/log4j2.xml which symlinks to /etc/openfire/log4j2.xml
/var/lib/openfire/conf/log4j2.xml

Which config do we need to change to get the logs in the admin console?
Are there any other changes we can make to get more than the error-logs?
Which log4j2.xml is the correct one to change if we need more details?
Any help is really appreciated!

Can I add a custom jar file to the lib directory?

I'm talking about: /usr/share/openfire/lib.

The reason I want to make volume here is because I'm using custom auth. To change the value of provider.auth.className property, I need to assign a lib file to this directory.

When I do this by adding volume myself:

openfire_1 | Error: Unable to access jarfile /usr/share/openfire/lib/startup.jar.

Method I followed:

  • Add ENV variable in Dockerfile: OPENFIRE_LIB_DIR=/usr/share/openfire/lib
  • Add VOLUME in Dockerfile: VOLUME ["${OPENFIRE_LIB_DIR}"]
  • Add initialize_lib_dir in entrypoint.sh:
+initialize_lib_dir() {
+  echo "Initializing ${OPENFIRE_LIB_DIR}..."
+
+  mkdir -p ${OPENFIRE_LIB_DIR}
+  chmod -R 0770 ${OPENFIRE_LIB_DIR}
+  chown -R ${OPENFIRE_USER}:${OPENFIRE_USER} ${OPENFIRE_LIB_DIR}
+}
+
 initialize_log_dir() {
   echo "Initializing ${OPENFIRE_LOG_DIR}..."
   mkdir -p ${OPENFIRE_LOG_DIR}
@@ -59,6 +67,7 @@ fi

 rewire_openfire
 initialize_data_dir
+initialize_lib_dir
 initialize_log_dir

And then I defined a volume with docker-compose and created this directory on my computer.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.