-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
47 lines (36 loc) · 1.2 KB
/
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# match the Ruby version with GitHub Actions workflow:
FROM ruby:3.3.6-slim
EXPOSE 25863
WORKDIR /usr/src
#####
# Install Google Cloud SDK
#####
RUN apt-get update && apt-get install -y \
curl \
git \
python3
RUN curl https://sdk.cloud.google.com > /tmp/install-gcloud &&\
chmod +x /tmp/install-gcloud &&\
bash /tmp/install-gcloud --disable-prompts
#####
# Configure Google Cloud SDK
#####
RUN echo "source /root/google-cloud-sdk/completion.bash.inc" >> /root/.bashrc
RUN echo "source /root/google-cloud-sdk/path.bash.inc" >> /root/.bashrc
RUN echo "export USE_GKE_GCLOUD_AUTH_PLUGIN=True" >> /root/.bashrc
RUN bash -lc "gcloud components update"
RUN bash -lc "gcloud components install kubectl gke-gcloud-auth-plugin"
#####
# Configure Ruby and co.
#####
# Configure Bundler to not install extra fluff with gems
RUN echo 'gem: --no-document' > /etc/gemrc
RUN gem install bundler
# `build-essential` is needed for building the `json` gem, used in development
RUN apt-get install -y build-essential
COPY Gemfile Gemfile.lock /usr/src/
RUN bundle install
RUN apt-get autoremove -y build-essential
COPY app /usr/src/
COPY config.yml /usr/src
ENTRYPOINT ["bash", "-lc", "bundle exec ruby turbulence.rb"]