forked from rails/docked
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
30 lines (21 loc) · 857 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
ARG RUBY_VERSION=3.2.0
FROM ruby:$RUBY_VERSION-slim
# Install dependencies
RUN apt-get update -qq && apt-get install -y build-essential libvips gnupg2 curl git
# Ensure node.js 19 is available for apt-get
ARG NODE_MAJOR=19
RUN curl -sL https://deb.nodesource.com/setup_$NODE_MAJOR.x | bash -
# Install node and yarn
RUN apt-get update -qq && apt-get install -y nodejs && npm install -g yarn
# Mount $PWD to this workdir
WORKDIR /rails
# Ensure gems are installed on a persistent volume and available as bins
VOLUME /bundle
RUN bundle config set --global path '/bundle'
ENV PATH="/bundle/ruby/$RUBY_VERSION/bin:${PATH}"
# Install Rails
RUN gem install rails
# Ensure binding is always 0.0.0.0, even in development, to access server from outside container
ENV BINDING="0.0.0.0"
# Overwrite ruby image's entrypoint to provide open cli
ENTRYPOINT [""]