21700: Install Bundler system-wide in Rails postinst
[arvados.git] / tools / arvbox / lib / arvbox / docker / Dockerfile.demo
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: AGPL-3.0
4
5 FROM arvados/arvbox-base
6 ARG arvados_version
7
8 RUN cd /usr/src && \
9     git clone --no-checkout https://git.arvados.org/arvados.git && \
10     git -C arvados checkout ${arvados_version} && \
11     chown -R 1000:1000 /usr/src
12
13 # avoid rebuilding arvados-server, it's already been built as part of the base image
14 RUN install $GOPATH/bin/arvados-server /usr/local/bin
15
16 ADD service/ /var/lib/arvbox/service
17 RUN ln -sf /var/lib/arvbox/service /etc
18 RUN mkdir -p $ARVADOS_CONTAINER_PATH
19 RUN echo "production" > $ARVADOS_CONTAINER_PATH/api_rails_env
20
21 # for the federation tests, the dev server watches a lot of files,
22 # and we run three instances of the docker container. Bump up the
23 # inotify limit from 8192, to avoid errors like
24 #   events.js:183
25 #         throw er; // Unhandled 'error' event
26 #         ^
27 #
28 #   Error: watch /usr/src/workbench2/public ENOSPC
29 # cf. https://github.com/facebook/jest/issues/3254
30 RUN echo fs.inotify.max_user_watches=524288 >> /etc/sysctl.conf
31
32 RUN /usr/local/lib/arvbox/createusers.sh
33
34 RUN sudo -u arvbox /var/lib/arvbox/service/api/run-service --only-deps
35 RUN sudo -u arvbox /var/lib/arvbox/service/workbench2/run-service --only-deps
36 RUN sudo -u arvbox /var/lib/arvbox/service/keep-web/run-service --only-deps
37 RUN sudo -u arvbox /var/lib/arvbox/service/doc/run-service --only-deps
38 RUN sudo -u arvbox /var/lib/arvbox/service/vm/run-service --only-deps
39 RUN sudo -u arvbox /var/lib/arvbox/service/keepproxy/run-service --only-deps
40 RUN sudo -u arvbox /var/lib/arvbox/service/arv-git-httpd/run-service --only-deps
41 RUN sudo -u arvbox /var/lib/arvbox/service/websockets/run --only-deps
42 RUN sudo -u arvbox /usr/local/lib/arvbox/keep-setup.sh --only-deps
43 RUN sudo -u arvbox /var/lib/arvbox/service/sdk/run-service