This repository provides a Dockerfile to create a Docker image for SmartFox Server 2X.
Make sure you have Docker installed on your system.
To pull the SmartFox Server Docker image from Docker Hub, use the following command:
docker pull dharmeshmp/smartfox:latest
This will fetch the latest version of the SmartFox Server Docker image.
To run the SmartFox Server Docker container, use the following command:
docker run -p 8080:8080 -p 8443:8443 -p 9933:9933 -p 9933:9933/udp -p 5000:5000 dharmeshmp/smartfox:latest
This will expose the necessary ports for SmartFox Server.
You can also use specific tags for different versions of SmartFox Server. For example, to use version 2.19.3, run:
docker pull dharmeshmp/smartfox:2.19.3
docker run -p 8080:8080 -p 8443:8443 -p 9933:9933 -p 9933:9933/udp -p 5000:5000 dharmeshmp/smartfox:2.19.3
If you prefer using Docker Compose, create a docker-compose.yml file with the following content:
version: '3'
services:
smartfox:
image: dharmeshmp/smartfox:latest
ports:
- "8080:8080"
- "8443:8443"
- "9933:9933"
- "9933:9933/udp"
- "5000:5000"
Run the following command to start SmartFox Server using Docker Compose:
docker-compose up -d
This will start the SmartFox Server container in detached mode.
You can extend the SmartFox Server Docker image to customize it for your specific requirements. Create a Dockerfile with the following content:
FROM dharmeshmp/smartfox:2.19.3
# Copy custom extension JAR file
COPY build/libs/*.jar /opt/SmartFoxServer_2X/SFS2X/extensions/Joker/extension.jar
# Copy custom zone configuration
COPY docker-smartfox/zones/Joker.zone.xml /opt/SmartFoxServer_2X/SFS2X/zones/Joker.zone.xml
# Copy custom server configuration
COPY docker-smartfox/config/server.xml /opt/SmartFoxServer_2X/SFS2X/config/server.xml
# Remove UploadsLock.txt to allow file uploads
RUN rm /opt/SmartFoxServer_2X/SFS2X/config/UploadsLock.txt
This example extends the base SmartFox Server image, adding custom extension JAR files, zone configurations, and server settings. Adjust it based on your specific requirements.
The following ports are exposed:
8080: HTTP port8443: HTTPS port9933: Default SmartFox Server port9933/udp: Default SmartFox Server UDP port5000: AdminTool portThe workflow automatically tags Docker images based on versioning and branch events.
This Docker image is provided under the MIT License.
Content type
Image
Digest
sha256:08c42f073…
Size
161.3 MB
Last updated
about 1 year ago
docker pull dharmeshmp/smartfox