Created
September 10, 2021 19:02
-
-
Save ronualdo/401f2475dfd36e0db2c24eaf3e227114 to your computer and use it in GitHub Desktop.
Just a random docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ruby:3.0.2-alpine3.14 | |
ARG UID | |
ARG GID | |
ARG BUNDLE_PATH="vendor/bundle" | |
ARG BUNDLE_DEPLOYMENT=true | |
ARG BUNDLE_WITHOUT="test development" | |
ENV BUNDLE_PATH $BUNDLE_PATH | |
ENV BUNDLE_DEPLOYMENT $BUNDLE_DEPLOYMENT | |
ENV BUNDLE_WITHOUT $BUNDLE_WITHOUT | |
ENV HOME "/tmp" | |
RUN apk add --no-cache make g++ git nodejs-current \ | |
gcc musl-dev tzdata postgresql-dev yarn | |
# Add a script to be executed every time the container starts. | |
COPY entrypoint.sh /usr/bin/ | |
RUN chmod +x /usr/bin/entrypoint.sh | |
WORKDIR /bitforma | |
RUN chown ${UID}:${GID} /bitforma | |
USER ${UID}:${GID} | |
COPY --chown=${UID}:${GID} Gemfile* /bitforma/ | |
RUN mkdir /bitforma/vendor && \ | |
bundle install --jobs=8 | |
COPY --chown=${UID}:${GID} . /bitforma | |
EXPOSE 3000 | |
ENTRYPOINT ["entrypoint.sh"] | |
# Configure the main process to run when running the image | |
CMD ["bin/rails", "server", "-b", "0.0.0.0"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment