这里是cker。
version: 3
services:
web:
environment:
- RUBYOPT=-rdebug
build:
context: .
dockerfile: Dockerfile
container_name: debug-rails
volumes:
- .:/app
ports:
- "3000:3000"
working_dir: /app
command: bash -c "bundle install && rails server -b 0.0.0.0"
db:
image: postgres:latest
container_name: debug-postgres
environment:
POSTGRES_USER: myappuser
POSTGRES_PASSWORD: myapppassword
POSTGRES_DB: myappdb
volumes:
- ./db-data:/var/lib/postgresql/data
下面是我的剪辑。
# Use the official Ruby image
FROM ruby:2.7.5
# Install dependencies
RUN apt-get update && apt-get install -y
build-essential
nodejs
yarn
# Set the working directory
WORKDIR /app
# Copy the Gemfile and Gemfile.lock into the container
COPY Gemfile Gemfile.lock ./
# Install gems
RUN bundle install
RUN gem install ruby-debug-ide debase
RUN gem install docker-api
# Copy the rest of the application code into the container
COPY . .
# Start the application
CMD ["rails", "server", "-b", "0.0.0.0"]
有些人能够帮助我如何与cker点断点连接起来?
我正试图补充一点点,如我们通常在废墟中添加的夸张。