This repository has been archived by the owner on Jan 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathDockerfile
47 lines (42 loc) · 1.83 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
# Copyright 2015 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
#you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
#
# jenkins-gcp-leader
#
# VERSION 0.0.2
FROM jenkins:1.625.3
MAINTAINER Evan Brown <[email protected]>
# Install plugins
USER root
COPY plugins.txt /usr/share/jenkins/plugins.txt
COPY workflow-version.txt /usr/share/jenkins/workflow-version.txt
RUN sed -i "s/@VERSION@/`cat /usr/share/jenkins/workflow-version.txt`/g" /usr/share/jenkins/plugins.txt
RUN /usr/local/bin/plugins.sh /usr/share/jenkins/plugins.txt
# Copy Jenkins configk
COPY jenkins/jobs /usr/share/jenkins/ref/jobs
RUN chown -R jenkins:jenkins /usr/share/jenkins/ref
# Install gcloud
ENV CLOUDSDK_PYTHON_SITEPACKAGES 1
RUN apt-get install -y -qq --no-install-recommends wget unzip python openssh-client \
&& apt-get clean \
&& cd /usr/local/bin \
&& wget https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.zip && unzip google-cloud-sdk.zip && rm google-cloud-sdk.zip \
&& google-cloud-sdk/install.sh --usage-reporting=true --disable-installation-options \
&& google-cloud-sdk/bin/gcloud --quiet components update preview \
&& google-cloud-sdk/bin/gcloud --quiet config set component_manager/disable_update_check true
ENV PATH /usr/local/bin/google-cloud-sdk/bin:$PATH
# Setup entrypoint
COPY start.sh /usr/local/bin/start.sh
RUN chown jenkins /usr/local/bin/start.sh
USER jenkins
ENTRYPOINT ["/usr/local/bin/start.sh"]