DEV Community

Marcelo Toledo
Marcelo Toledo

Posted on

How to hide Ruby 2.7 deprecation warnings in docker

Tired of Ruby ​​2.7 alerts in your docker application? Put this key into your environment: RUBYOPT=-W0. In your docker-compose.yml:

# docker-compose.yml

version: '3.6'

services:
  server:
    image: "your_image"
    container_name: "your_application_name"
    ports:
      - "3000:3000"
    environment:
      - BUNDLE_PATH=vendor/bundle
      - BUNDLE_DISABLE_SHARED_GEMS=1
      - RUBYOPT=-W0

Cheers 🍻

Top comments (0)