-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
40 lines (22 loc) · 1006 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
28
29
30
31
32
33
34
35
36
37
38
39
40
FROM ruby:2.3.0
LABEL maintainer = "Jnpr-community-netdev <[email protected]>"
LABEL version="1.0"
ENV PUPPET_AGENT_VERSION="3.7.3"
ENV VERSION "1.1"
ENV NAME "jpuppet-agent"
WORKDIR /puppet-agent
COPY puppet-agent/Gemfile ./
RUN mkdir /etc/puppet
COPY puppet-agent/puppet.conf /etc/puppet/
RUN apt-get update \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN gem uninstall -i /usr/local/lib/ruby/gems/2.3.0 bundler
RUN gem install bundler -v "< 2.0"
RUN gem install bundle -v "< 2.0"
RUN bundle install
RUN sed -i '/YAML_ENGINE = defined?(YAML::ENGINE) ? YAML::ENGINE.yamler : "syck"/c\ YAML_ENGINE = defined?(YAML::ENGINE) ? YAML::ENGINE.yamler : (defined?(Psych) && YAML == Psych ? "psych" : "syck")' \
/usr/local/bundle/gems/puppet-3.7.3/lib/puppet/vendor/safe_yaml/lib/safe_yaml.rb
COPY puppet-agent/transaction.rb /usr/local/bundle/gems/puppet-3.7.3/lib/puppet/transaction.rb
COPY puppet-agent/startup.sh /
ENTRYPOINT ["/bin/bash", "-e", "/startup.sh"]