forked from Eigenfocus/eigenfocus
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.dev
More file actions
39 lines (29 loc) · 1.1 KB
/
Dockerfile.dev
File metadata and controls
39 lines (29 loc) · 1.1 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
FROM ruby:3.3.1-slim
ARG UID=1000
ARG GID=1000
WORKDIR /app
RUN apt-get update -qq && apt-get install -yq --no-install-recommends \
build-essential \
gnupg2 \
less \
git \
nodejs \
curl libjemalloc2 libvips sqlite3 && \
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
apt-get update -qq && apt-get install --no-install-recommends -y yarn && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
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
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"]