-
-
Notifications
You must be signed in to change notification settings - Fork 942
Closed
Milestone
Description
I'm running Jruby 9.3 on JDK17 locally on my MacBook (m1 chip) without any issues for a week now. But when I setup a docker image to do this, the container fails to run the rails console.
Dockerfile
FROM openjdk:17-jdk-buster
RUN apt-get update && apt-get install -y build-essential git shared-mime-info libc6-dev --no-install-recommends && rm -rf /var/lib/apt/lists/*
ENV JRUBY_VERSION 9.3.0.0
ENV JRUBY_SHA256 2dc1f85936d3ff3adc20d90e5f4894499c585a7ea5fedec67154e2f9ecb1bc9b
RUN mkdir /opt/jruby \
&& curl -fSL https://repo1.maven.org/maven2/org/jruby/jruby-dist/${JRUBY_VERSION}/jruby-dist-${JRUBY_VERSION}-bin.tar.gz -o /tmp/jruby.tar.gz \
&& echo "$JRUBY_SHA256 /tmp/jruby.tar.gz" | sha256sum -c - \
&& tar -zx --strip-components=1 -f /tmp/jruby.tar.gz -C /opt/jruby \
&& rm /tmp/jruby.tar.gz \
&& update-alternatives --install /usr/local/bin/ruby ruby /opt/jruby/bin/jruby 1
ENV PATH /opt/jruby/bin:$PATH
# skip installing gem documentation
RUN mkdir -p /opt/jruby/etc \
&& { \
echo 'install: --no-document'; \
echo 'update: --no-document'; \
} >> /opt/jruby/etc/gemrc
RUN gem install bundler rake net-telnet xmlrpc
# don't create ".bundle" in all our apps
ENV GEM_HOME /usr/local/bundle
ENV BUNDLE_SILENCE_ROOT_WARNING=1 \
BUNDLE_APP_CONFIG="$GEM_HOME"
ENV PATH $GEM_HOME/bin:$PATH
# adjust permissions of a few directories for running "gem install" as an arbitrary user
RUN mkdir -p "$GEM_HOME" && chmod 777 "$GEM_HOME"
CMD ["irb"]Docker compose
version: '3'
services:
api:
build: .
stdin_open: true
tty: true
command: /bin/bash
ports:
- '3000:3000'
volumes:
- '.:/app'
env_file:
- '.env'Environment Information
Provide at least:
- JRuby version:
jruby 9.3.0.0 (2.6.8) 2021-09-17 85c20e780f OpenJDK 64-Bit Server VM 17+35-2724 on 17+35-2724 +jit [linux-aarch64] - Operating system and platform:
Linux 955e16e092aa 5.10.47-linuxkit #1 SMP PREEMPT Sat Jul 3 21:50:16 UTC 2021 aarch64 GNU/Linux - Running on Docker inside Apple Macbook (M1 Chip)
Other relevant info you may wish to add:
- Application/framework version: Rails 6.0.2
- Environment variables: Just database config
Expected Behavior
Rails console should open without any errors/warnings.
Actual Behavior
Running rails c just outputs io/console on JRuby shells out to stty for most operations and gets stuck.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
