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

add server dockerfile #4

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

johnnv1
Copy link
Member

@johnnv1 johnnv1 commented Jan 7, 2025

This PR adds a Dockerfile to the bubbaloop project, allowing users to build and run the bubbaloop server without needing to set up Rust or any other dependencies locally. The Dockerfile is designed to create a multi-stage build, ensuring that the final image is as small and efficient as possible.

Key Features:

  1. Multi-stage Build: The Dockerfile uses a multi-stage build to separate the build environment from the production environment. This ensures that the final image only contains the necessary runtime dependencies.
  2. Dependency Caching: Dependencies are cached during the build process to speed up subsequent builds.
  3. Minimal Production Image: The production image is based on rust:1.83.0-slim-bookworm, which is a minimal image that only includes the necessary runtime dependencies.
  4. Environment Variables and Port Mapping: The Dockerfile includes instructions for setting environment variables and port mappings when running the container.

How to Build and Run the Image:

  1. Build the Image:
    docker build -t bubbaloop:local .
  2. Run the Image:
    docker run -it \
        --name bubbaloop-server \
        -p 3000:3000 \
        -e RUST_LOG=debug \
        bubbaloop:local

Copy link
Member

@edgarriba edgarriba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dockerfile Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
@johnnv1 johnnv1 force-pushed the add-server-dockerfile branch from 97c286a to 78b3456 Compare January 8, 2025 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants