Skip to content

Instantly share code, notes, and snippets.

@kirs
Last active June 1, 2020 08:12
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kirs/3912e1a44b67fda906ab4f6aad09ebaf to your computer and use it in GitHub Desktop.
Save kirs/3912e1a44b67fda906ab4f6aad09ebaf to your computer and use it in GitHub Desktop.
version: '3'
services:
dev:
build:
dockerfile: Dockerfile
context: ./
command: sleep infinity
volumes:
- .:/workspace:cached
FROM ubuntu:bionic
ENV DEBIAN_FRONTEND=noninteractive
# tools you need to build MRI
RUN apt-get update && apt-get install -y tzdata git ruby autoconf bison gcc make zlib1g-dev libffi-dev libreadline-dev libgdbm-dev libssl-dev build-essential
@nsiregar
Copy link

You may want to add

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get install -y tzdata

to Dockerfile when encounter fails during make check for timezone related tests.

For network-related tests that may fail, you can enable ipv6 for docker by editing /etc/docker/daemon.json

{
    "ipv6": true,
    "fixed-cidr-v6": "2001:db8:1::/64"
}

restart docker daemon with # systemctl reload docker.service, then enable ipv6 on your container add this on docker-compose.yml

sysctls:
  - net.ipv6.conf.all.disable_ipv6=0

@kirs
Copy link
Author

kirs commented Jan 26, 2020

@nsiregar great advice, thank you!

@nsiregar
Copy link

nsiregar commented Jan 30, 2020

@kirs thank you, I tried your tutorial in Ubuntu 18.04 but encounter those error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment