2020-04-16 18:50:52 +00:00
|
|
|
FROM ruby:2.6.6-stretch
|
2018-09-06 21:29:07 +00:00
|
|
|
ARG USER
|
|
|
|
RUN mkdir /myapp
|
|
|
|
COPY script/build/debian/prebuild.sh myapp/script/build/debian/prebuild.sh
|
|
|
|
RUN myapp/script/build/debian/prebuild.sh
|
|
|
|
COPY script/build/debian/node.sh myapp/script/build/debian/node.sh
|
|
|
|
RUN myapp/script/build/debian/node.sh
|
|
|
|
COPY script/build/debian/postgres.sh myapp/script/build/debian/postgres.sh
|
|
|
|
RUN myapp/script/build/debian/postgres.sh
|
|
|
|
COPY script/build/debian/java.sh myapp/script/build/debian/java.sh
|
|
|
|
RUN myapp/script/build/debian/java.sh
|
2019-01-09 23:57:35 +00:00
|
|
|
COPY gems /myapp/gems/
|
2018-09-06 21:29:07 +00:00
|
|
|
WORKDIR /myapp
|
2019-01-17 17:50:55 +00:00
|
|
|
COPY Gemfile /myapp/Gemfile
|
|
|
|
COPY Gemfile.lock /myapp/Gemfile.lock
|
2019-11-05 22:17:11 +00:00
|
|
|
RUN gem install bundler -v "~>1.0"
|
2019-01-17 17:50:55 +00:00
|
|
|
RUN bundle install
|
2018-09-06 21:29:07 +00:00
|
|
|
RUN groupadd -r -g 1000 $USER
|
|
|
|
RUN useradd -r -m -g $USER -u 1000 $USER
|
|
|
|
RUN chown -R $USER /usr/lib/node_modules
|
|
|
|
RUN chgrp -R $USER /usr/lib/node_modules
|
2019-01-17 17:50:55 +00:00
|
|
|
RUN chown -R $USER /myapp
|
|
|
|
RUN chgrp -R $USER /myapp
|
2018-09-06 21:29:07 +00:00
|
|
|
RUN chown -R $USER /myapp/Gemfile
|
|
|
|
RUN chgrp -R $USER /myapp/Gemfile.lock
|
2018-12-10 21:23:46 +00:00
|
|
|
RUN chown -R $USER /usr/local/bundle
|
|
|
|
RUN chgrp -R $USER /usr/local/bundle
|
2018-09-06 21:29:07 +00:00
|
|
|
USER $USER
|
|
|
|
EXPOSE 5000
|
|
|
|
CMD foreman start
|