-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathDockerfile.dev
More file actions
42 lines (27 loc) · 1.02 KB
/
Dockerfile.dev
File metadata and controls
42 lines (27 loc) · 1.02 KB
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
ARG RUBY_VERSION=4.0.0
FROM registry.docker.com/library/ruby:$RUBY_VERSION-slim AS base
ARG UID=1000
ARG GID=1000
WORKDIR /app
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential git libvips pkg-config gnupg2 curl libyaml-dev
# Install Node.js
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y nodejs
RUN npm install -g yarn
ENV LANG=C.UTF-8 \
BUNDLE_JOBS=4 \
BUNDLE_RETRY=3 \
BUNDLE_PATH="/app/.bundle" \
BUNDLE_INSTALL_FLAGS="--no-document" \
YARN_CACHE_FOLDER="/app/.yarn-cache" \
RUBOCOP_CACHE_ROOT="/app/.rubocop-cache"
RUN mkdir -p /app/node_modules /app/.bundle /app/.yarn-cache /app/.rubocop-cache
RUN chown -R ${UID}:${GID} /app/node_modules /app/.bundle /app/.yarn-cache /app/.rubocop-cache
ENV HOME=/app
USER ${UID}:${GID}
RUN gem update --system && gem install bundler
ENTRYPOINT ["bin/docker-entrypoint-dev"]
EXPOSE 3000
CMD ["bundle", "exec", "rails", "s", "-b", "0.0.0.0"]