-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile.dev
62 lines (48 loc) · 1.57 KB
/
Dockerfile.dev
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Use the official Ruby image as a base image
FROM ruby:3.3.5-slim-bullseye
RUN apt-get update -qq && apt-get install -yq --no-install-recommends \
build-essential \
gnupg2 \
less \
libssl-dev \
bash \
git \
telnet \
wget \
nodejs \
iproute2 \
curl
RUN apt-get update -qq && apt-get install -y \
libpq-dev
RUN apt-get update && apt-get install -y wget gnupg2 lsb-release \
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" | tee /etc/apt/sources.list.d/pgdg.list \
&& wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \
&& apt-get update \
&& apt-get install -y postgresql-client-15 \
&& rm -rf /var/lib/apt/lists/*
# openssl 3 required for puma to run
RUN wget https://www.openssl.org/source/openssl-3.0.10.tar.gz \
&& tar -xvf openssl-3.0.10.tar.gz \
&& cd openssl-3.0.10 \
&& ./config \
&& make \
&& make install
# Set the working directory
WORKDIR /app
# Copy the Gemfile and Gemfile.lock
COPY ./Gemfile ./Gemfile.lock ./
RUN mkdir vpn
COPY vpn/ibis-openvpn.ovpn ./vpn/ibis-openvpn.ovpn
# Install gems
RUN bundle install
# Copy the rest of the application code
COPY . ./
# Copy database from our home directory
# COPY .nsl/editor-database.yml /root/.nsl/editor-database.yml
RUN chmod 600 .pgpass
# Precompile assets (optional, if you have assets to precompile)
# RUN bundle exec rake assets:precompile
# Expose port 3000 to the outside world
EXPOSE 3000 3001
# Start the Rails server
#CMD ["bash", "-c", "rm -f tmp/pids/server.pid && bundle exec rails server -b 0.0.0.0 -p 3000"]