LogoPly
Deployment

Docker

Run and deploy Ply apps using Docker containers.

Docker support

You can containerize a Ply application with Docker for deployment or local development.


Dockerfile example

The following Dockerfile builds and runs the app:

# Use Go base image
FROM golang:1.26 AS builder

WORKDIR /app
COPY . .

# Build the binary
RUN go build -o server main.go

# Use minimal base image for final image
FROM debian:bookworm-slim

WORKDIR /app
COPY --from=builder /app/server .

# Expose port and run
EXPOSE 8080
CMD ["./server"]

Build and run

docker build -t my-ply-app .
docker run -p 8080:8080 my-ply-app

Tips

  • Use ENV or .env files for configuration.
  • Mount volumes for logs or data if needed.
  • Use multi-stage builds to reduce image size.