Skip to content

About

Base packer template to run any machin image

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

Packer Template for Docker

This folder contains a Packer template for building a Docker image with a specified version of Python installed.

Files

  • version.pkr.hcl: Specifies the required Packer version and plugins.
  • variables.pkr.hcl: Defines the variables used in the template.
  • template.pkr.hcl: The main Packer template file that defines the build configuration.
  • sources.pkr.hcl: Specifies the source Docker image to use.

Prerequisites

  • Packer version 1.7.0 or higher.

  • Docker installed and running on your machine.

    brew install docker

Building the Docker Image

To build the Docker image, follow these steps:

  1. Clone the repository:

    git clone https://github.com/mehrdadmm/Packer-Template-for-Docker.git
  2. Initialize the Packer template:

    packer init .
  3. Build the Docker image:

    packer build .

Customizing the Python Version

By default, the template installs PHP 8.2. To customize the PHP version, you can override the php_version variable:

packer build -var 'php_version=8' .

About

Base packer template to run any machin image

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages