-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathDockerfile.dev
40 lines (31 loc) · 1.06 KB
/
Dockerfile.dev
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
31
32
33
34
35
36
37
38
39
40
FROM --platform=linux/amd64 ruby:3.3.4
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
WORKDIR /usr/src/app
EXPOSE 3100
RUN apt-get update -y && apt-get install -y --no-install-recommends \
default-jre \
default-mysql-client \
imagemagick \
libprotobuf-dev \
protobuf-compiler
# Workaround for PhantomJS: https://github.com/DMOJ/online-judge/pull/1270
ENV OPENSSL_CONF /etc/ssl/
ENV NODE_VERSION 16.20.2
ENV NVM_DIR=/root/.nvm
COPY package.json yarn.lock ./
RUN apt install -y curl \
&& curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash \
&& . "$NVM_DIR/nvm.sh" \
&& nvm install $NODE_VERSION \
&& nvm alias default $NODE_VERSION \
&& nvm use default \
&& npm install -g yarn \
&& yarn install
ENV NODE_PATH $NVM_DIR/v$NODE_VERSION/lib/node_modules
ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH
RUN gem install bundler:2.5.9 \
&& gem install therubyracer -v '0.12.3' --source 'https://rubygems.org/' -- --with-system-v8
COPY Gemfile* /usr/src/app/
ENV BUNDLE_PATH /gems
RUN bundle install
COPY . /usr/src/app/