-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathDockerfile
40 lines (31 loc) · 1.07 KB
/
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
31
32
33
34
35
36
37
38
39
40
# syntax=docker/dockerfile:1
ARG RUBY_VERSION=3.2.2
FROM ruby:${RUBY_VERSION}-slim
RUN apt-get update -qq && apt-get install -yq --no-install-recommends \
build-essential \
gnupg2 \
curl \
less \
git \
libvips \
libpq-dev \
postgresql-client \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Install Node.js and Yarn
ARG NODE_VERSION=20.7.0
ARG YARN_VERSION=latest
ENV PATH=/usr/local/node/bin:$PATH
RUN curl -sL https://github.com/nodenv/node-build/archive/master.tar.gz | tar xz -C /tmp/ && \
/tmp/node-build-master/bin/node-build "${NODE_VERSION}" /usr/local/node && \
npm install -g yarn@$YARN_VERSION && \
rm -rf /tmp/node-build-master
# Update RubyGems
RUN gem update --system && gem install bundler
# Use what the base image provides rather than create our own app directory
WORKDIR /usr/src/app/
# Add a script to be executed every time the container starts.
COPY .dockerdev/entrypoint.sh /usr/bin/
RUN chmod +x /usr/bin/entrypoint.sh
ENTRYPOINT ["entrypoint.sh"]
EXPOSE 3000
CMD ["bundle", "exec", "rails", "s", "-b", "0.0.0.0"]