-
Notifications
You must be signed in to change notification settings - Fork 35
/
Dockerfile
27 lines (20 loc) · 665 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
FROM ruby:2.7.8
# Install and use an compatible bundler
ENV BUNDLER_VERSION=1.17.3
RUN gem install bundler -v "${BUNDLER_VERSION}"
# Install required gems before copying in code
# to avoid re-installing gems when developing
WORKDIR /app
COPY Gemfile /app
COPY Gemfile.lock /app
COPY aptible-cli.gemspec /app
# We reference the version, so copy that in, too
CMD mkdir -p /app/lib/aptible/cli/
COPY lib/aptible/cli/version.rb /app/lib/aptible/cli/
RUN bundle install
COPY . /app
# Save on typing while testing
RUN echo '#!/bin/bash' > /usr/bin/aptible \
&& echo 'bundle exec bin/aptible $@' >> /usr/bin/aptible \
&& chmod +x /usr/bin/aptible
CMD ["aptible"]