Created
August 16, 2018 17:45
-
-
Save Evshved/aaecb70bd5949dbb36fc7e0317cc8765 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 rubyroidlabs/rails:5.1.4-5 | |
ARG BRANCH=master | |
ARG RAILS_ENV | |
ARG DEVISE_SECRET_KEY | |
ARG SECRET_KEY_BASE | |
ARG POSTGRES_DB | |
ARG POSTGRES_USER | |
ARG POSTGRES_PASSWORD | |
ARG POSTGRES_HOST | |
ARG POSTGRES_MAX_THREADS | |
ARG REDIS_URL | |
ARG REDIS_HOST | |
ARG TERM | |
ARG AWS_BUCKET | |
ARG AWS_KEY_ID | |
ARG AWS_ACCESS_KEY | |
ARG AWS_REGION | |
ARG SSH_PRIVATE_KEY | |
RUN ln -sf /usr/share/zoneinfo/US/Pacific /etc/localtime | |
RUN ls -a | |
WORKDIR / | |
# Copy ssh keys | |
COPY id_rsa /root/.ssh/id_rsa | |
COPY id_rsa.pub /root/.ssh/id_rsa.pub | |
# Create known_hosts | |
RUN touch /root/.ssh/known_hosts | |
# Add github key | |
RUN ssh-keyscan github.com >> /root/.ssh/known_hosts | |
# Change id_rsa to only readable mode | |
RUN chmod 400 /root/.ssh/id_rsa | |
RUN git clone -b $BRANCH --single-branch [email protected]:Saicheg/poststamps-backend.git backend | |
WORKDIR /backend | |
RUN bundle install | |
RUN yarn install | |
RUN bundle exec rake assets:precompile | |
RUN rm -rf /root/.ssh/ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment