forked from bhavikkumar/jenkins-jekyll
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
47 lines (31 loc) · 1.38 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
FROM jenkins/jenkins
MAINTAINER Dominik Schön <[email protected]>
# Switch to root
USER root
# Update everything
RUN apt-get -y update
RUN apt-get -y upgrade
# Install pre-reqs for Jekyll
RUN apt-get -y install zip maven build-essential ruby libffi-dev python python-dev python-pip apt-transport-https ca-certificates curl software-properties-common
RUN apt-get --no-install-recommends -y install fakeroot
RUN apt-get --no-install-recommends -y install sudo && \
echo "jenkins ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers
RUN pip install virtualenv
# ENV VERSION=v4.9.1 NPM_VERSION=2
# ENV VERSION=v6.14.2 NPM_VERSION=3
ENV VERSION=v8.11.1 NPM_VERSION=5 YARN_VERSION=latest
# ENV VERSION=v10.0.0 NPM_VERSION=6 YARN_VERSION=latest
# For base builds
# ENV CONFIG_FLAGS="--fully-static --without-npm" DEL_PKGS="libstdc++" RM_DIRS=/usr/include
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -
RUN curl -L https://raw.githubusercontent.com/jgsqware/clairctl/master/install.sh | sh
RUN apt-get install -y nodejs
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
RUN apt-get update && apt-get -y install yarn
# Clean up
RUN rm -rf /usr/lib/ruby/gems/*/cache/*.gem
# Switch back to jenkins
USER jenkins
ENV DOCKER_GID_ON_HOST ""
COPY jenkins.sh /usr/local/bin/jenkins.sh