HUB
Sign inSign up

softfour/services

By softfour

•Updated about 11 hours ago

Java service runtime with SSH access, cron and persistent storage; multiple Temurin JRE variants.

Image
Languages & frameworks
0

6.4K

softfour/services repository overview

⁠Softfour Java Services

Run a Java service from a persistent application directory, with SSH access and cron for operations. The default application is /opt/services/services.jar.

⁠Tags and platforms

TagJava runtime
latestCurrently the same image as jre-25
jre-25Eclipse Temurin JRE 25
jre-21Eclipse Temurin JRE 21
jre-17Eclipse Temurin JRE 17
jre-11Eclipse Temurin JRE 11
jre-8Eclipse Temurin JRE 8

Published platforms checked on 2026-11-08: linux/amd64. No native ARM64 variant is currently advertised. Older tags can have different startup behavior and configuration support; the runtime instructions below describe the current source and JRE 25 variant.

Tags are updated in place. A Java tag selects the runtime line, not a fixed Softfour image release. Use a digest when an exact image is required.

⁠Quick start with Docker Compose

Provide an existing SSH public key; the private key stays on your client:

export SERVICES_AUTHORIZED_KEY="$(cat ~/.ssh/id_ed25519.pub)"

Save the following as compose.yaml:

services:
  services:
    image: softfour/services:jre-25
    hostname: services
    restart: unless-stopped
    environment:
      SERVICES_TZ: "UTC"
      SERVICES_AUTHORIZED_KEY: "${SERVICES_AUTHORIZED_KEY:?Set SERVICES_AUTHORIZED_KEY to your public key}"
    ports:
      - "127.0.0.1:2222:22"
      - "127.0.0.1:8080:8080"
    volumes:
      - services:/opt/services

volumes:
  services:
    name: services
docker compose config --quiet
docker compose up -d

Ports in this example are available only on the Docker host's loopback interface. Port 2222 forwards to SSH port 22; change the host port if it is already in use. Port 8080 is an example application port; your JAR must actually listen on it.

The explicit volume name preserves the existing services volume convention. Use a unique volume name per deployment; when upgrading, reuse the original volume. Mount on /opt only for older volumes that already contain a nested services directory.

⁠Deploy the service JAR

The container starts SSH and cron, then waits until the configured JAR exists and is non-empty. The default retry interval is 300 seconds; a running container can therefore still be waiting for its application.

Copy a locally built JAR to a temporary name, then rename it atomically and restart:

docker compose cp ./services.jar services:/opt/services/services.jar.tmp
docker compose exec -T services mv /opt/services/services.jar.tmp /opt/services/services.jar
docker compose restart services
docker compose logs --tail=100 services

The entrypoint runs java -jar "$SERVICES_JAR". Replacing a JAR does not restart an already running JVM. The SSH account services and the Java process are separate concerns; the current entrypoint launches Java as the container's default user.

⁠Runtime configuration

VariableDefaultPurpose
SERVICES_TZUTCTime zone, for example Europe/Rome
SERVICES_LOCALE_GENen_US.UTF-8 UTF-8Locale definition generated at startup
SERVICES_LANGen_US.UTF-8Process locale
SERVICES_LANGUAGEen_US:enLanguage preference
SERVICES_LC_ALLen_US.UTF-8Locale override
SERVICES_PATHJava bin directory plus standard system pathsRuntime and SSH executable search path
SERVICES_AUTHORIZED_KEYUnsetOptional public key appended to authorized_keys; required by the example above
SERVICES_AUTHORIZED_KEYS_FILEUnsetOptional path inside the container to a readable file of public keys
SERVICES_JAR/opt/services/services.jarExecutable JAR path
SERVICES_JAR_WAIT_SECONDS300Positive retry interval in seconds

/opt/services/services.env, if present, is sourced after initial defaults and before runtime configuration. Values assigned there can override settings supplied through the container environment, including the JAR path and wait interval. It is executable shell input, not a general dotenv parser; only trusted administrators should be able to write it. Prefer a single configuration source to avoid unintended overrides.

⁠SSH, persistence and security

SSH accepts public-key authentication for services only; root login and password authentication are disabled. To connect using the Compose example:

ssh -p 2222 [email protected]

For a mounted public-key file, set SERVICES_AUTHORIZED_KEYS_FILE to its container path and mount that file read-only. The entrypoint also creates an Ed25519 key pair under /opt/services/.ssh when missing and adds its public key to authorized_keys. External access should normally use your own client public key as shown above, without distributing the generated private key.

Authorized keys are appended and persisted. Removing a key from an environment variable does not revoke a previously stored key; remove it from /opt/services/.ssh/authorized_keys to revoke access.

The volume stores application files, .ssh and .ssh_host host identity keys. Back it up securely and do not share it between independent deployments. Persistence of host keys avoids unexpected identity changes on recreation. For permission failures, check ownership and SSH permissions (.ssh 0700, authorized_keys 0600). Do not publish SSH publicly unless required and protected by your deployment's access controls.

⁠Operations and troubleshooting

docker compose ps
docker compose logs --tail=100 services
docker compose exec -T services java -version

If SSH works but the application is unavailable, check for the JAR wait message, the configured path and the application listening port. Application stdout/stderr is available through docker compose logs.

⁠Upgrade and rollback

Back up the persistent volume and record the current image digest before upgrading. Keep the same volume mapping, then:

docker compose pull services
docker compose up -d services

Choose the Java tag compatible with your application. For rollback, restore the previous digest in the Compose image field (softfour/services@sha256:...) and recreate the container. Application or data changes may also require restoring their matching backup.

⁠Maintenance and support

Maintained by Softfour⁠. For support, use your existing Softfour support channel and include the image tag, digest, platform and relevant logs with credentials removed.

The repository README is the source for this Docker Hub overview. Documentation updates do not change image contents. No versioned image changelog is currently published; record the digest before upgrading.

⁠License and upstream

The runtime is based on Eclipse Temurin⁠, with OpenSSH, cron and distribution packages. Third-party components retain their respective licenses. Contact Softfour for licensing information about image-specific files.

Tag summary

Content type

Image

Digest

sha256:ca870220e…

Size

193.6 MB

Last updated

about 11 hours ago

docker pull softfour/services