Public Repository

Last pushed: 17 days ago
Short Description
Alpine image with Packer + AWS CLI + Goodies
Full Description

marcelocorreia/packer

Docker image with Hashicorp Packer + AWS CLI + Goodies

Packages

- ca-certificates 
- update-ca-certificates
- curl
- unzip 
- bash 
- python 
- py-pip 
- openssh 
- git 
- make 
- tzdata
- awscli (via PIP)  

INFO

Usage

$> docker run --rm -v $(pwd):/opt/workspace \
           marcelocorreia/packer \
           packer [--version] [--help] <command> [args]

Setting timezone

$> docker run --rm -v $(pwd):/opt/workspace \
        -e TZ=Australia/Sydney \
           marcelocorreia/packer \
           packer [--version] [--help] <command> [args]

Example

$> docker run --rm -v $(pwd):/opt/workspace \
           marcelocorreia/packer \
           packer build template.json \
           -var aws_access_key=${aws_access_key_id} \
           -var aws_secret_key=${aws_secret_access_key}

Makefile example

# Packer

#
bake-mysql:
    $(call packer_run, build, -var-file=mysql-vars.json, mysql.json)


validate-consul:
    $(call packer_run, validate, -var-file=consul-vars.json, consul.json)

define packer_run
    packer $1 $2 $3;
endef

Check the Concourse CI Pipeline used to build this image

Concourse Build Configuration Example

platform: linux

image_resource:
  type: docker-image
  source:
    repository: marcelocorreia/packer
    tag: 'latest'

inputs:
- name: packer-repo

run:
  path: packer
  args: 
  - build
  - -var-file
  - variables.vars
Docker Pull Command
Owner
marcelocorreia