-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathDockerfile
30 lines (21 loc) · 865 Bytes
/
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
FROM registry.opensuse.org/opensuse/infrastructure/tsp/containers/base:main
ARG CONTAINER_USERID
# Configure our user
RUN usermod -u $CONTAINER_USERID tsp
WORKDIR /app
RUN gem.ruby2.7 install mini_racer -v 0.6.3
RUN gem.ruby2.7 install ffi -v '1.15.5'
# Configure our bundle
# ENV BUNDLE_FORCE_RUBY_PLATFORM=true
RUN bundler.ruby2.7 config build.ffi --enable-system-libffi; \
bundler.ruby2.7 config build.nokogiri --use-system-libraries; \
bundler.ruby2.7 config build.sassc --disable-march-tune-native; \
bundler.ruby2.7 config build.nio4r --with-cflags='-Wno-return-type'
ADD Gemfile /app/Gemfile
ADD Gemfile.lock /app/Gemfile.lock
RUN bundler.ruby2.7 install --jobs=3 --retry=3
RUN chown -R tsp /app
# Now do the rest as the user with the same ID as the user who
# builds this container
USER tsp
CMD ["rails", "server", "-b", "0.0.0.0"]