Giter VIP home page Giter VIP logo

puppetlabs-image_build's Introduction

image_build

Puppet Forge Build Status Coverage Status

Table of Contents

  1. Module description - What is the image_build module, and what does it do?
  2. Setup - The basics of getting started with image_build
  3. Usage - How to build Docker containers with Puppet
  4. Reference - Sample help output from the tool
  5. Limitations - OS compatibility, etc.
  6. Maintainers - who maintains this project

Module description

The basic purpose of image_build is to enable building various images, including Docker images, from Puppet code. There are two main cases where this can be useful:

  1. You have an existing Puppet codebase and you're moving some of your services to using containers. By sharing the same code between container and non-container based infrastructure you can cut down on duplication of effort, and take advantage of work you've already done.
  2. You're building a lot of images, but scaling Dockerfile means either a complex hierachy of images or copy-and-pasting snippets between many individual Dockerfiles. image_build allows for sharing common functionality as Puppet modules, and Puppet itself provides a rich domain-specific language for declarative composition of images.

Setup

puppetlabs/image_build is a Puppet Module and is available on the Forge.

The following should work in most cases:

puppet module install puppetlabs/image_build

You don't need any additional gems installed unless you are looking to work on developing the module. All you need is a working Docker environment or acbuild, for which I'd recommend Docker for Mac or Docker for Windows or just installing Docker if you're on Linux. For acbuild you can use the rkt module.

Usage

With the module installed you should have access to two new puppet commands; puppet docker and puppet aci. These have two subcommands, one will trigger a build of an image, the other can be used to output the intermediary dockerfile or shell script.

The examples directory contains a set of examples for experimenting with. Simply open up examples/nginx and run:

puppet docker build

The above is the simplest example of a build. Some settings are provided in the accompanying metadata.yaml file, while others are defaults specific to the tool. You can change values in the metadata file (useful for version control) or you can override those values on the command line.

puppet docker build --image-name puppet/sample --cmd nginx --expose 80

See the full help page for other arguments for specifying different base images, setting a maintainer, using Rocker instead of Docker for the build and much more.

puppet docker build --help

You can also output the intermediary dockerfile using another subcommand. This is useful for both debugging and if you want to do something not natively supported by the tool.

puppet docker dockerfile

A hello world example - Nginx

Lets see a simple hello world example. We'll create a Docker image running Nginx and serving a simple text file.

First lets use a few Puppet modules from the Forge. We'll use the existing nginx module and we'll specify it's dependencies. We're also using dummy_service to ignore service resources in the Nginx module.

$ cat Puppetfile
forge 'https://forgeapi.puppetlabs.com'

mod 'puppet/nginx'
mod 'puppetlabs/stdlib'
mod 'puppetlabs/concat'
mod 'puppetlabs/apt'
mod 'puppetlabs/dummy_service'

Then lets write a simple manifest. Disabling nginx daemon mode isn't supported by the module yet so we drop a file in place. Have a look at manifests/init.pp:

include 'dummy_service'

class { 'nginx': }

nginx::resource::vhost { 'default':
  www_root => '/var/www/html',
}

file { '/var/www/html/index.html':
  ensure  => present,
  content => 'Hello Puppet and Docker',
}

exec { 'Disable Nginx daemon mode':
  path    => '/bin',
  command => 'echo "daemon off;" >> /etc/nginx/nginx.conf',
  unless  => 'grep "daemon off" /etc/nginx/nginx.conf',
}

And finally lets store the metadata in a file rather than pass on the command line. Take a look at metadata.yaml:

cmd: nginx
expose: 80
image_name: puppet/nginx

Now lets build a Docker image. Note that you'll need docker available on your host to do so, along with the image_build module installed.

puppet docker build

And finally lets run our new image. We expose the webserver on port 8080 to the local host.

$ docker run -d -p 8080:80 puppet/nginx
83d5fbe370e84d424c71c1c038ad1f5892fec579d28b9905cd1e379f9b89e36d
$ curl http://0.0.0.0:8080
Hello Puppet and Docker%

Involving hiera - Elasticsearch

The Elasticsearch example is similar to the above, with a few additional features demonstrated. In particular the use of Hiera to provide additional context for the Puppet build. You can find this in the examples/elasticsearch directory.

puppet docker build manifests/init.pp --image-name puppet/es --expose 9200 --cmd /docker-entrypoint.sh

A note on options with multiple arguments

Several of the arguments to image_build can take a list of values. This is done by passing in comma separated values. For instance, to specify an ENTRYPOINT like so:

ENTRYPOINT ["nginx", "-g", "daemon off"]

You can pass the following on the commandline:

--entrypoint nginx,'-g','daemon off'

Building multiple images from one manifest

One advantage of using Puppet for building Docker images is you are removed from the need to have a single Dockerfile per image. Meaning a single repository of Puppet code can be used to describe multiple images. This makes ensuring all images use (for example) the same repositories or same hardening scripts much easier to enforce. Change code in one place and rebuild multiple images.

Describing multiple images in Puppet is done using the existing node resource in your manifest. For instance:

node 'node1' {
  webserver { 'hello node 1': }
}

node 'node2' {
  webserver { 'hello node 2': }
}

You can then select which image to build when running the build command, by explicitly passing the image-name.

puppet docker build --image-name puppet/node1

The match for the node resource in the Puppet code is done without the repository name, in this case the puppet/ before node1.

Note that you may want different metadata for different images. image_build will attempt to detect additional metadata in the metadata folder, and will merge items from metadata/metadata.yaml with node specific metadata, for instance from metadata/node1.yaml

You can see an example of this settup in the examples/multi directory.

Using a Puppet Master

The above examples all use local manifests copied to the image during build, but image_build also supports using a Puppet Master. You can provide metadata via a local metadata file or directory, or by passing command line arguments to the build command as shown in the examples above. The only change is passing --master like so.

puppet docker dockerfile --master puppet.example.com --image-name puppet/node1 --expose 80 --cmd nginx

The hostname passed to the Puppet Master will take the form node1.{datetime}.dockerbuilder. This means you can match on that pattern in your manifests, for instance like so:

node /^node1/ {
  webserver { 'hello node 1': }
}

A worked example is provided in the examples/master folder. You can either upload this to an existing Puppet Master or Puppet Enterprise install, or run a new local master using Docker.

First install the dependent modules into the local environment:

r10k puppetfile install --moduledir code/environments/production/modules

Create an autosign.conf file with the following:

*.dockerbuilder.*

Then, from the examples/master folder, use Docker to run an instance of Puppet Server:

docker run --name puppet -P --hostname puppet -v $(pwd)/code:/etc/puppetlabs/code -v $(pwd)/autosign.conf:/etc/puppetlabs/puppet/autosign.conf puppet/puppetserver-standalone

Determine the port on which the Puppet Server is exposed locally:

docker port puppet

You'll also need the IP address of your local machine. Replace the {ip} and {port} in the following with your own values.

puppet docker dockerfile --master {ip}:{port} --image-name puppet/node1 --expose 80 --cmd nginx

This should use the code on the Puppet Master to build the image.

Minimizing image size with Rocker

image_build supports using the Rocker build tool in place of the standard Docker build command. The Rocker output provides a little more detail about the build process, but also allows for mounting of folders at build time which minimizes the size of the resulting image.

puppet docker build --rocker

Note that when using Rocker the Puppet tools are not left in the final image, reducing it's file size.

Building ACI images

As well as Docker support, image_build also experimentally supports building ACI compatible images for use with Rkt or other supported runtimes. This works in the same manner as above. The following command should generate a shell script which, when run, generates an ACI:

puppet aci script

And if you simply want to build the ACI directly you can just run:

puppet aci build

Reference

$ puppet docker --help
USAGE: puppet docker <action> [--from STRING]
[--maintainer STRING]
[--os STRING]
[--os-version STRING]
[--puppet-agent-version STRING]
[--r10k-version STRING]
[--module-path PATH]
[--expose STRING]
[--cmd STRING]
[--entrypoint STRING]
[--labels KEY=VALUE]
[--rocker]
[--[no-]inventory]
[--hiera-config STRING]
[--hiera-data STRING]
[--image-user STRING]
[--puppetfile STRING]
[--image-name STRING]
[--config-file STRING]
[--config-directory STRING]
[--master STRING]

Build Docker images and Dockerfiles using Puppet code

OPTIONS:
  --render-as FORMAT             - The rendering format to use.
  --verbose                      - Whether to log verbosely.
  --debug                        - Whether to log debug information.
  --cmd STRING                   - The default command to be executed by the
                                   resulting image
  --config-directory STRING      - A folder where metadata can be loaded from
  --config-file STRING           - A configuration file with all the metadata
  --entrypoint STRING            - The default entrypoint for the resulting
                                   image
  --expose STRING                - A list of ports to be exposed by the
                                   resulting image
  --from STRING                  - The base docker image to use for the
                                   resulting image
  --hiera-config STRING          - Hiera config file to use
  --hiera-data STRING            - Hieradata directory to use
  --image-name STRING            - The name of the resulting image
  --image-user STRING            - Specify a user to be used to run the
                                   container process
  --[no-]inventory               - Enable or disable the generation of an
                                   inventory file at /inventory.json
  --labels KEY=VALUE             - A set of labels to be applied to the
                                   resulting image
  --maintainer STRING            - Name and email address for the maintainer of
                                   the resulting image
  --master STRING                - A Puppet Master to use for building images
  --module-path PATH             - A path to a directory containing a set of
                                   modules to be copied into the image
  --network STRING               - The Docker network to pass along to the
                                   docker build command
  --os STRING                    - The operating system used by the image if not
                                   autodetected
  --os-version STRING            - The version of the operating system used by
                                   the image if not autodetected
  --puppet-agent-version STRING  - Version of the Puppet Agent package to
                                   install
  --puppet-debug                 - Pass the debug flag to the Puppet process
                                   used to build the container image
  --puppetfile STRING            - Enable use of Puppetfile to install
                                   dependencies during build
  --r10k-version STRING          - Version of R10k to use for installing modules
                                   from Puppetfile
  --rocker                       - Use Rocker as the build tool
  --[no-]show-diff               - Enable or disable showing the diff when
                                   running Puppet to build the image
  --skip-puppet-install          - If the base image already contains Puppet we
                                   can skip installing it
  --volume STRING                - A list of volumes to be added to the
                                   resulting image

ACTIONS:
  build         Build a Docker image from Puppet code
  dockerfile    Generate a Dockerfile which will run the specified Puppet code

See 'puppet man docker' or 'man puppet-docker' for full help.

Limitations

The module currently does not support building Windows containers, or building containers from a Windows machine. We'll be adding support for these in the future.

The inventory functionality does not work correctly on Centos 6 based images, so if you're using Centos 6 then you need to pass the --no-inventory flag.

Maintainers

This repository is maintained by: Gareth Rushgrove [email protected].

puppetlabs-image_build's People

Contributors

ccaum avatar garethr avatar gerardkok avatar gregohardy avatar hajee avatar jonnaladheeraj avatar luckyraul avatar mcslow avatar rnelson0 avatar sheenaajay avatar tylerpace avatar waipeng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

puppetlabs-image_build's Issues

ability to insert local modules

Hi,

If you develop a puppet module and in combination with this project you get a lot of overhead since you have to

  1. Push your code somewhwere (git / svn)
  2. Change Puppetfile in so that docker will think there is a change
  3. Wait until r10k has installed all modules

It would be easer to have a agurment for this (which can be used multipe times). Something like
puppet docker build --add-module /path/to/your/module and it will translate into the docker file like this
COPY /path/to/your/module /etc/puppetlabs/code/modules/modulename
where modulename is the last part of /path/to/your/module

this line en should be inserted before init.pp is applied.

Ability to used different facts defined at hiera.yaml

Hello,

I'm trying this puppet module with success! Building a Centos OS image using the nginx example including Hiera. I have a simple question, I hope you can guide me through.

Taking the elasticsearch example where you use hiera, (puppetlabs-image_build/examples/elasticsearch/) you specified the hierarchy tree starting with common, this works perfectly fine if I run

puppet docker build --image-name puppet/nginx --from centos:6 --no-inventory

This take into account the use of the common.yaml you express the variables i.e.

elasticsearch::version: 2.3.4
elasticsearch::manage_repo: true

My question is if you write your hierarchy at hiera.yaml file as

:hierarchy:

  • prod
  • dev
  • common

:backends:

  • yaml

:yaml:
:datadir: '/hieradata'

Specifying different versions of elasticsearch to install as parameters values on prod/dev facts, How can I construct using the module, one image using prod other using dev?

My guess was to use something like, but this failed to build.

puppet docker build --image-name puppet/nginx --from centos:6 --no-inventory --hiera-config hieradata/prod.yaml

Thanks in advance.

Missing license

The repo currently does not state how this code is licensed - could you please add a license to clarify that ?

Git r10k

May be it not a good idea to remove git before r10k installs modules ?

Step 6/12 : RUN /opt/puppetlabs/puppet/bin/r10k puppetfile install --moduledir /etc/puppetlabs/code/modules
 ---> Running in 146dca567f57
ERROR	 -> No Git providers are functional.

Unable to build from base image that already has puppet

When trying to run against a base container that has already been built using puppet docker build it fails with the following error message

INFO[0001] RUN rpm -Uvh https://yum.puppetlabs.com/puppetlabs-release-pc1-el-6.noarch.rpm &&     yum upgrade -y &&     yum update -y &&     yum install -y puppet-agent-"$PUPPET_AGENT_VERSION" &&     yum clean all 
INFO[0002] | Created container 2a95bf529cf7 (image sha256:35047) 
Retrieving https://yum.puppetlabs.com/puppetlabs-release-pc1-el-6.noarch.rpm
Preparing...                ##################################################
	package puppetlabs-release-pc1-1.1.0-4.el6.noarch (which is newer than puppetlabs-release-pc1-1.1.0-2.el6.noarch) is already installed
INFO[0005] | Removing container 2a95bf529cf7            
FATA[0005] Container 2a95bf529cf7 exited with code 2    

Missing Tag in Repo

Forge has: Version 0.6.0 released Jul 26th 2017

But no 'v0.6.0' tag in repository.

Got permission denied while trying to connect to the Docker daemon socket

When run puppet docker build I get the following error:

Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.27/build?buildargs=%7B%7D&cachefrom=%5B%5D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile20170608-28836-9pbeue&labels=%7B%7D&memory=0&memswap=0&networkmode=default&rm=1&shmsize=0&t=puppet%2Fapache&ulimits=null: dial unix /var/run/docker.sock: connect: permission denied

I've both add libre (me) and puppet to docker group w/ command:
sudo usermod -a -G docker puppet

but still no success

Will not work with Centos

In imagebuilder.rb, def determine_environment_vars currently has no section for centos but returns an error stating centos is supported.

Error building images when in metadata file is used centos as parameter for "from" field

Hello,

Creating the metadata file to build images , if you use Centos as distribution, by example:

cmd: "/usr/sbin/apache2,-DFOREGROUND"
expose: 80
image_name: puppetdocker/apachetest
from: centos

The next error is obtained, the URL to obtain the rpm is incorrect. The #{@context[:os_version]} is "null" and because of this the URL is badly generated:

curl: (22) The requested URL returned error: 404 Not Found
error: skipping https://yum.puppetlabs.com/puppet5/puppet5-release-el-.noarch.rpm - transfer failed

If you define the tag for your image, the error is solved. By example, next metadata solve the problem:

cmd: "/usr/sbin/apache2,-DFOREGROUND"
expose: 80
image_name: puppetdocker/apachetest
from: centos:7

My OS is Ubuntu 17.10 artful and I'm using the 0.7.0 for the puppetlabs-image_build

examples/nginx failes because lsb-release is removed from image

Even if a custom image, which includes lsb-release, is supplied via --from commandline,
puppet docker build failes for the nginx example because, apt needs facts from lsb-release:

tep 8/12 : RUN apt-get update &&     FACTER_hostname=nginx /opt/puppetlabs/bin/puppet apply manifests/init.pp --verbose --show_diff --summarize  --app_management &&     apt-get autoremove -y &&     apt-get clean &&     rm -rf /var/lib/apt/lists/*
 ---> Running in 251ea7336263
Get:1 http://security.debian.org jessie/updates InRelease [63.1 kB]
Ign http://apt.puppetlabs.com jessie InRelease
Ign http://deb.debian.org jessie InRelease
Get:2 http://deb.debian.org jessie-updates InRelease [145 kB]
Get:3 http://security.debian.org jessie/updates/main amd64 Packages [437 kB]
Get:4 http://apt.puppetlabs.com jessie Release.gpg [836 B]
Get:5 http://deb.debian.org jessie Release.gpg [2373 B]
Get:6 http://deb.debian.org jessie-updates/main amd64 Packages [17.6 kB]
Get:7 http://apt.puppetlabs.com jessie Release [40.6 kB]
Get:8 http://deb.debian.org jessie Release [148 kB]
Get:9 http://apt.puppetlabs.com jessie/PC1 amd64 Packages [15.6 kB]
Get:10 http://deb.debian.org jessie/main amd64 Packages [9049 kB]
Fetched 9919 kB in 3s (2539 kB/s)
Reading package lists...
Info: Loading facts
Info: Loading facts
Info: Loading facts
Error: Evaluation Error: Error while evaluating a Function Call, Unable to determine lsbdistid, please install lsb-release first at /etc/puppetlabs/code/modules/apt/manifests/params.pp:134:7 on node nginx.credativ.lan

Possible solution would be to either install lsb-release in example init.pp, or (IMO better) to don't purge lsb-release from image. It is likeley it is needed for a lot of modules.

set show diff optional

In some cases --show_diff create an error Error: invalid byte sequence in US-ASCII trying to compare file even if you are replacing it completely.

Since inside most docker images has not set correct locale - it fails build

Build w/ Docker master on Mac isn't actually.. easy.

I was trying out some of the examples, and while most work great on a Docker for Mac environment, building using a master, especially the new local master wasn't as easy.

I ended up having to install puppet-agent for the Mac (not shocking), but then also figuring out how to get r10K onto the mac, since it's not included in the agent packaging. (I'd been tempted to try to use the ubuntu-docker container, or the actual puppet-server container, but this was probably better. Maybe this should be in the standard agent?)

sudo /opt/puppetlabs/puppet/bin/gem install r10k
sudo ln -s /opt/puppetlabs/puppet/bin/r10k /opt/puppetlabs/bin/r10k

The largest issue I had was actually determining the IP to use for the puppet master. Docker build can't use a docker network, oddly enough, and you don't want to use the port exposed to the mac for the puppet server.

You may want to do something like this as your puppet image build command:

puppet docker build  --master `docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' puppet` --image-name puppet/node1 --expose 80 --cmd nginx

That will determine the IP of the container from the prior line, and use that to populate the docker build command. It turns out you can specify network for dockerfile commands. Which would mean adding the --network option to likely both metadata and the command line.

I'd make this a pull request, but I'm not sure how you'd like this formatted for intelligibility. I suspect the tech writer types have opinions on this, and my slapdash method probably isn't it...

passing facts in

Is there any current way to pass facts down into the puppet apply or puppet agent commands that run inside the containers?

I'd like to be able to point to my current master and set a list of facts in order to "mimic" a container build of a current node configuration.

Pass `--debug` to puppet apply

It would be nice to be able to apply --debug to puppet apply to get more log info when debugging. It looks like this module can't currently do that (the -debug to puppet docker build debugs this module, not the puppet). I don't mind writing the patch for adding this functionality. Would you rather introduce a new flag (maybe --debug-puppet) or make the existing -debug also debug the puppet?

Entrypoint array missing commas

If you use the --entrypoint option with an array (eg --entrypoint '["nginx", "-g", "daemon off"]') then the resulting Dockerfile removes the commas from the array: Step 9 : ENTRYPOINT ["nginx" "-g" "daemon off"]. This is invalid syntax and the resulting Dockerfile fails to run.

The Dockerfile should be produced with ENTRYPOINT ["nginx", "-g", "daemon off"].

Debian buster support not working

Add support for Debian buster-based Docker images. At the time of this writing Debian Buster has been available for more than two months.

Error: No such file or directory - fork failed

Every single example I run give me the following error :

Debug: Runtime environment: puppet_version=4.10.1, ruby_version=2.1.9, run_mode=user, default_encoding=UTF-8
Error: No such file or directory - fork failed
Error: Try 'puppet help docker build' for usage

I tried with puppet 3.7.2 and 4.10.1.
Module version 0.3.0 and 0.2.0
Debian 8

Building from master - not doing anything?

I setup my master to autosign *.dockerbuilder - and gave *.dockerbuild a node definition, that includes a role- that only installs a few packages.

When trying to run it:
puppet docker dockerfile --master puppet.internal.org:8140 --image-name puppet/oase_ci_image --cmd bash

I get this the output below - but no image is built?:

FROM ubuntu:16.04

ENV PUPPET_AGENT_VERSION="1.8.2" R10K_VERSION="2.2.2" CODENAME="xenial" 

RUN apt-get update && \
    apt-get install --no-install-recommends -y lsb-release wget ca-certificates && \
    wget https://apt.puppetlabs.com/puppetlabs-release-pc1-"$CODENAME".deb && \
    dpkg -i puppetlabs-release-pc1-"$CODENAME".deb && \
    rm puppetlabs-release-pc1-"$CODENAME".deb && \
    apt-get update && \
    apt-get install --no-install-recommends -y puppet-agent="$PUPPET_AGENT_VERSION"-1"$CODENAME" && \
    apt-get remove --purge -y wget && \
    apt-get autoremove -y && \
    apt-get clean && \
    mkdir -p /etc/puppetlabs/facter/facts.d/ && \
    rm -rf /var/lib/apt/lists/* 

  
    
RUN apt-get update && \
    FACTER_hostname=oase_ci_image.20170724T1432200200.dockerbuilder /opt/puppetlabs/bin/puppet agent --server puppet.yousee.idk --masterport 8140 --verbose --onetime --no-daemonize --show_diff --summarize && \
    apt-get autoremove -y && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/* 
    
  

LABEL com.puppet.inventory="/inventory.json"
RUN /opt/puppetlabs/bin/puppet module install puppetlabs-inventory && \
    /opt/puppetlabs/bin/puppet inventory all > /inventory.json

CMD ["bash"]

https_proxy support

Hi,
currently evaluating this module, but i'm stuck when it tries to reach a ressource using https:

invocation (it's the hello world example):

puppet docker build --apt-proxy $http_proxy --http-proxy $http_proxy

...downloads all the apt stuff until it comes to the point where it requests a https ressource ( triggered by : .. && wget https://apt.puppetlabs.com/puppetlabs-release-pc1-"$CODENAME".deb &&.. )

--2017-02-10 12:57:37--  https://apt.puppetlabs.com/puppetlabs-release-pc1-xenial.deb
Resolving apt.puppetlabs.com (apt.puppetlabs.com)... 192.155.89.90, 2600:3c03::f03c:91ff:fedb:6b1d

it fails there as the https_proxy isn't set. An option --https-proxy isn't available yet.

Am I doing something wrong?

version.:

/etc/puppet/modules
└── puppetlabs-image_build (v0.1.2)

tried to get around this by setting --env https_proxy=$https_proxy but same result

Hooks to Extend Dockerfile

Have you considered adding one or more hooks so that people could add arbitrary Dockerfile directives while still working within the metadata "framework"? For example, a pre-apply hook to allow for SSL certificate configuration before attempting to apply Puppet.

Will not work with centos:6

When attempting to use with centos6 it doesn't respect the os_version when laying down the RPM to install the puppet agent, instead it is hard coded to 7.

tc_container [ ]$puppet docker build --os centos --os-version 6 --from centos:6
Sending build context to Docker daemon  7.68 kB
Step 1 : FROM centos:6
 ---> cf2c3ece5e41
Step 2 : ENV PUPPET_AGENT_VERSION "1.6.1" R10K_VERSION "2.2.2"
 ---> Using cache
 ---> dbcd696d5513
Step 3 : RUN rpm -Uvh https://yum.puppetlabs.com/puppetlabs-release-pc1-el-7.noarch.rpm &&     y

Add `--tag`option

Hey,

Thanks for the work on this module. It would be great to have a --tag option where one could specify a tag that should be applied to the output image if it builds successfully. Much like the docker build -t option.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.