-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
62 lines (52 loc) · 1.3 KB
/
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
FROM debian:bookworm-slim
WORKDIR /mastodon
ENV \
RAILS_ENV="development" \
NODE_ENV="development" \
RAILS_SERVE_STATIC_FILES="true" \
BIND="0.0.0.0" \
DEBIAN_FRONTEND="noninteractive" \
PATH=/root/.rbenv/shims:/root/.rbenv/bin:/usr/local/sbin::$PATH
COPY ./mastodon /mastodon/
RUN apt-get update \
&& apt-get install -y \
git \
curl \
# rbenv dependencies
# https://github.com/rbenv/ruby-build/wiki#ubuntudebianmint
autoconf \
patch \
build-essential \
rustc \
libssl-dev \
libyaml-dev \
libreadline6-dev \
zlib1g-dev \
libgmp-dev \
libncurses5-dev \
libffi-dev \
libgdbm6 \
libgdbm-dev \
libdb-dev \
uuid-dev \
# mastodon dependencies
libidn11-dev \
imagemagick \
ffmpeg \
file \
libpq-dev \
# dev tools
rbenv \
# ruby-build \
ruby-foreman
RUN git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build \
&& rbenv install
RUN bundle config git.allow_insecure true \
&& bundle install
# https://github.com/nodesource/distributions/blob/master/README.md
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
&& apt-get install -y nodejs
RUN corepack enable yarn \
&& yarn install --immutable
RUN bundle exec rails assets:precompile
EXPOSE 3000 4000