Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make the Dockerfile / docker-compose.yml version independent using an… #5

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ LICENSE
README.md
.arc*
utils/*
config/*
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
*.deb
/config/openfire/data/*
/config/openfire/logs/*
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM openjdk:17-jdk-slim-bullseye

ENV OPENFIRE_VERSION=4.7.4 \
ARG OPENFIRE_VERSION=4.7.4
ENV OPENFIRE_VERSION=${OPENFIRE_VERSION} \
OPENFIRE_USER=openfire \
OPENFIRE_DATA_DIR=/var/lib/openfire \
OPENFIRE_LOG_DIR=/var/log/openfire
Expand Down
16 changes: 14 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
version=4.7.4

all: build

build:
@docker build --tag=gizmotronic/openfire .
@docker build --tag=openfire --build-arg OPENFIRE_VERSION=$(version) .

release: build
@docker build --tag=gizmotronic/openfire:$(shell cat VERSION) .
@docker build --tag=openfire:$(version) --build-arg OPENFIRE_VERSION=$(version) .
@echo $(version) > VERSION

run: release
@OPENFIRE_VERSION=$(version) docker compose run --rm openfire

help:
@echo "Targets: build, release, run"
@echo "Optional parameter: version=x.y.z"
@echo "Example: make release version=4.7.4"
@echo "For Openfire version information see https://github.com/igniterealtime/Openfire/releases"
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
version: '2'
services:
openfire:
image: nasqueron/openfire:4.7.4
image: openfire:${OPENFIRE_VERSION}
ports:
- "9090:9090/tcp"
- "9091:9091/tcp"
- "5222:5222/tcp"
- "7777:7777/tcp"
volumes:
- /srv/docker/openfire/data:/var/lib/openfire
- /srv/docker/openfire/logs:/var/log/openfire
- ./config/docker/openfire/data:/var/lib/openfire
- ./config/docker/openfire/logs:/var/log/openfire