diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..ae011dc0f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +# Use Node.js official image as the base image +FROM node:18 + +# Set the working directory inside the container +WORKDIR /app + +# Copy package.json and yarn.lock to the working directory +COPY package.json yarn.lock ./ + +# Install application dependencies using Yarn +RUN yarn + +# Copy the rest of the application code to the working directory +COPY . . + +# Command to start the development server +CMD ["yarn", "dev"] + +# Expose the port on which the application will run +EXPOSE 3000 diff --git a/README.md b/README.md index 743421c76..8983f5ee4 100644 --- a/README.md +++ b/README.md @@ -172,6 +172,20 @@ If you are using Google Chrome, or another browser that supports Progressive Web 2. Click your browser's settings menu 3. Click "Install Carbon..." +#### Running Carbon with Docker + +If you prefer to run Carbon using Docker, follow these steps: + +1. Build the Docker Image + ```sh + docker build -t carbon . + ``` +2. Run the Docker Container + ```sh + docker run -p 3000:3000 carbon + ``` +3. Open your web browser and go to http://localhost:3000. + ## Community Check out these projects our awesome community has created: