Running Hammy in Docker
Running Hammy in Docker
To run Hammy using Docker, follow these steps:
docker run -p 9090:9090 -v /var/www/html:/var/www/html gohammy/hammy
Editing the Docker Image
To customize the Hammy Docker image, you can create a new Dockerfile to include additional dependencies or configurations. Here’s a basic example for adding PHP!
# Start with the base image
FROM gohammy/hammy:latest
# ADD PHP to hammy!
RUN apt-get update && apt-get install -y php
# Expose the necessary port
EXPOSE 9090
# Run the Hammy server
CMD ["./hammy"]
To build the Docker image from this Dockerfile, use the following command:
# docker build -t custom-hammy-image .