-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
47 lines (34 loc) · 997 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Use the Alpine Linux distribution as the base image
FROM ruby:3.1.2-alpine
# Variable
ARG WORK_DIR=/liburrun_app
ARG BUNDLER_VERSION=2.3.24
ENV BUNDLER_VERSION=${BUNDLER_VERSION}
# Set the working directory in the container
WORKDIR ${WORK_DIR}
# Install dependencies
RUN apk add --update --no-cache \
build-base \
postgresql-dev \
tzdata \
nodejs \
yarn \
git \
bash \
&& rm -rf /var/cache/apk/*
# add libvips for the image analysis and transformations
RUN apk add --update --no-cache file vips
# Fix [Linux musl] "Error loading shared library"
RUN apk add --update --no-cache gcompat
# Copy the Gemfile and Gemfile.lock to the image
COPY Gemfile Gemfile.lock package.json yarn.lock ./
# Install specific bundler
RUN gem install bundler:${BUNDLER_VERSION} --no-document
# Install the gems
RUN bundle install --retry=2
# Install the packages
RUN yarn install
# Copy the rest of the application code to the image
COPY . .
EXPOSE 3000
CMD ["/bin/bash"]