-
Notifications
You must be signed in to change notification settings - Fork 16
/
Dockerfile
69 lines (55 loc) · 1.69 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
FROM ubuntu:latest
MAINTAINER Raymond Barbiero <[email protected]>
ENV DEBIAN_FRONTEND noninteractive
ENV NOKOGIRI_USE_SYSTEM_LIBRARIES 1
# Nokogiri dependencies
RUN true \
&& apt-get update \
&& apt-get install -qy --force-yes git ruby ruby-dev build-essential \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN true \
&& apt-get update \
&& apt-get install -qy libxslt1-dev libxml2-dev libssl-dev libyaml-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN true \
&& apt-get update \
&& apt-get install -qy --no-install-recommends openjdk-8-jdk openjdk-8-jre \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN true \
&& apt-get update \
&& apt-get install -qy --no-install-recommends curl\
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN curl -sL https://services.gradle.org/distributions/gradle-5.6.4-bin.zip -o gradle-5.6.4.zip \
&& unzip -d /usr/share gradle-5.6.4.zip \
&& ln -s /usr/share/gradle-5.6.4/bin/gradle /usr/bin/gradle \
&& gradle --version \
&& rm gradle-5.6.4.zip
RUN true \
&& apt-get update \
&& apt-get install -qy vim curl lsof libxml2 libxml2-dev pkg-config \
&& apt-get clean \
&& gem install bundler nokogiri \
&& rm -rf /var/lib/apt/lists/*
RUN true \
&& git clone https://github.com/jenkinsci/job-dsl-plugin.git /jdsl \
&& cd /jdsl \
&& gradle oneJar
ENV DSL_JAR "/jdsl/job-dsl-core/build/libs/job-dsl-core-*-standalone.jar"
ENV APP_HOME /app
ENV HOME /root
RUN mkdir $APP_HOME
WORKDIR $APP_HOME
COPY Gemfile* $APP_HOME/
RUN bundle config --global silence_root_warning 1 \
&& bundle install
# Upload source
COPY . $APP_HOME
# Start server
ENV PORT 3000
EXPOSE 3000
VOLUME ["/var/www/uploads"]
CMD ["ruby", "server.rb"]