# syntax=docker/dockerfile:1 FROM bullseye-base COPY script/build/debian/prebuild.sh houdini/script/build/debian/prebuild.sh RUN houdini/script/build/debian/prebuild.sh # Use NodeSource for installation of Node 14.x COPY --chown=root:root docker/data/nodesource.list /etc/apt/sources.list.d/nodesource.list COPY --chown=root:root docker/data/nodesource.gpg.key /usr/share/keyrings/nodesource.gpg.key RUN gpg --dearmor < /usr/share/keyrings/nodesource.gpg.key > /usr/share/keyrings/nodesource.gpg RUN rm -f /usr/share/keyrings/nodesource.gpg.key RUN chown root.root /usr/share/keyrings/nodesource.gpg RUN chmod 644 /usr/share/keyrings/nodesource.gpg # Use yarnkpkg for installation of Yarn COPY --chown=root:root docker/data/yarn.list /etc/apt/sources.list.d/yarn.list RUN chmod 644 /etc/apt/sources.list.d/yarn.list COPY --chown=root:root docker/data/yarnpkg.gpg.key /usr/share/keyrings/yarnpkg.gpg.key RUN gpg --dearmor < /usr/share/keyrings/yarnpkg.gpg.key > /usr/share/keyrings/yarnpkg.gpg RUN rm -f /usr/share/keyrings/yarnpkg.gpg.key RUN chown root.root /usr/share/keyrings/yarnpkg.gpg RUN chmod 644 /usr/share/keyrings/yarnpkg.gpg # Run script to put keys in place and install COPY --chown=root:root script/build/debian/node.sh houdini/script/build/debian/node.sh RUN houdini/script/build/debian/node.sh # Switch to houdini user, rest of file run in as that user after created RUN /sbin/useradd --home-dir /houdini --create-home --shell /bin/bash houdini RUN chown -R houdini.houdini /houdini USER houdini # Install RVM 1.29.12 COPY --chown=houdini:houdini docker/data/rvm-mpapis.gpg.key /houdini/keys-for-rvm/rvm-mpapis.gpg.key RUN gpg --import /houdini/keys-for-rvm/rvm-mpapis.gpg.key COPY --chown=houdini:houdini docker/data/pkuczynski.gpg.key /houdini/keys-for-rvm/pkuczynski.gpg.key RUN gpg --import /houdini/keys-for-rvm/pkuczynski.gpg.key RUN curl --fail --location --max-redirs 10 --connect-timeout 30 --retry-delay 2 --retry 3 -sS --create-dirs --output /houdini/.rvm/archives/rvm-1.29.12.tgz https://github.com/rvm/rvm/archive/1.29.12.tar.gz RUN curl --fail --location --max-redirs 10 --connect-timeout 30 --retry-delay 2 --retry 3 -sS --create-dirs --output /houdini/.rvm/archives/rvm-1.29.12.tgz.asc https://github.com/rvm/rvm/releases/download/1.29.12/1.29.12.tar.gz.asc RUN gpg /houdini/.rvm/archives/rvm-1.29.12.tgz.asc RUN mkdir -p /houdini/.rvm/src/rvm RUN cd /houdini/.rvm/src/rvm && tar xzf /houdini/.rvm/archives/rvm-1.29.12.tgz --no-same-owner --strip-components 1 RUN cd /houdini/.rvm/src/rvm && ./scripts/install --path /houdini/.rvm ENV PATH="$PATH:/houdini/.rvm/bin" RUN echo 'source "/houdini/.rvm/scripts/rvm"' >> ~/.bashrc RUN rvm autolibs disable RUN rvm requirements RUN rvm install 2.7.3 --disable-binary --with-jemalloc # COPY script/build/debian/postgres.sh houdini/script/build/debian/postgres.sh # RUN houdini/script/build/debian/postgres.sh # COPY gems /houdini/gems/ # WORKDIR /houdini # COPY Gemfile /houdini/Gemfile # COPY Gemfile.lock /houdini/Gemfile.lock # RUN gem install bundler -v "~>1.0" # RUN bundle install # CMD rake -T