-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (27 loc) · 854 Bytes
/
Copy pathDockerfile
File metadata and controls
40 lines (27 loc) · 854 Bytes
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
# Dockerfile
FROM ruby:3.4.4
# Define la carpeta de trabajo
WORKDIR /app
# Instala dependencias necesarias del sistema
RUN apt-get update -qq && \
apt-get install -y build-essential libpq-dev curl gnupg &&\
apt-get install -y watchman
# Instala Node.js (usamos 22.16.0)
RUN curl -fsSL https://deb.nodesource.com/setup_22.x -o nodesource_setup.sh && \
bash nodesource_setup.sh && \
apt-get install -y nodejs
# Habilita Corepack para usar Yarn
RUN corepack enable && corepack prepare yarn@stable --activate
ENV TZ=America/Managua
# Instala Rails
RUN gem install rails -v 8.0.2
COPY Gemfile .
COPY Gemfile.lock .
RUN bundle install
COPY . .
RUN yarn install
COPY entrypoint.sh /usr/bin/
RUN chmod +x /usr/bin/entrypoint.sh
ENTRYPOINT ["entrypoint.sh"]
EXPOSE 3000
CMD ["rails", "server"]