Skip to content

Commit

Permalink
Merge pull request #15 from shantanoo-desai/dev
Browse files Browse the repository at this point in the history
fix(docker): false docker configurations + updates
  • Loading branch information
shantanoo-desai authored Mar 20, 2024
2 parents 0b0a4b4 + ad627db commit b203552
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ TEST_TEMPLATE_FILE:=./templates/test.pkr.hcl
init:
packer init ${TEMPLATE_FILE}

test-focal: init
test-focal: validate-focal
source /etc/os-release; PACKER_LOG=1 packer build -force -var host_distro=$${ID} -var-file=${FOCAL_VARS_FILE} ${TEST_TEMPLATE_FILE}

test-jammy: init
test-jammy: validate-jammy
source /etc/os-release; PACKER_LOG=1 packer build -force -var host_distro=$${ID} -var-file=${JAMMY_VARS_FILE} ${TEST_TEMPLATE_FILE}

build-focal: init
build-focal: validate-focal
source /etc/os-release; PACKER_LOG=1 packer build -force -var host_distro=$${ID} -var-file=${FOCAL_VARS_FILE} ${TEMPLATE_FILE}

build-jammy: init
build-jammy: validate-jammy
source /etc/os-release; PACKER_LOG=1 packer build -force -var host_distro=$${ID} -var-file=${JAMMY_VARS_FILE} ${TEMPLATE_FILE}

validate-focal: init
Expand Down
6 changes: 4 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
FROM hashicorp/packer:1.8
FROM hashicorp/packer:1.10
ENV PACKER_CACHE_DIR=/app/packer_cache
ENV PACKER_CONFIG_DIR=/app

RUN apk add --no-cache --update \
make \
Expand All @@ -14,7 +15,8 @@ RUN apk add --no-cache --update \
python3 \
py3-pip \
unzip \
wget
wget \
py3-netifaces

WORKDIR /app

Expand Down
10 changes: 4 additions & 6 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,31 @@ services:
build: ./
image: qemu-packer-builder:latest
privileged: true
mem_limt: 4GB
cpus: 4
devices:
- /dev/kvm
volumes:
- "../:/app"
# - "/home/<USER>/.cache/packer:/app/packer_cache" # Packer Cache for faster builds
- "../packer_cache:/app/packer_cache" # Packer Cache for faster builds
- "/usr/share/OVMF/OVMF_CODE.fd:/usr/share/OVMF/OVMF_CODE.fd"
environment:
PACKER_LOG: 1
network_mode: host
command:
- make -C ./server/amd64 build-focal
- make build-focal
vm-builder-jammy:
build: ./
image: qemu-packer-builder:latest
privileged: true
mem_limt: 4GB
cpus: 4
devices:
- /dev/kvm
volumes:
- "../:/app"
# - "/home/<USER>/.cache/packer:/app/packer_cache" # Packer Cache for faster builds
- "../packer_cache:/app/packer_cache" # Packer Cache for faster builds
- "/usr/share/OVMF/OVMF_CODE.fd:/usr/share/OVMF/OVMF_CODE.fd"
environment:
PACKER_LOG: 1
network_mode: host
command:
- make -C ./server/amd64 build-jammy
- make build-jammy
4 changes: 2 additions & 2 deletions vars/jammy.pkrvars.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
# limitations under the License.

## Packer Variables for Ubuntu 22.04.2 Live Server (Jammy Jellyfish)
ubuntu_version = "22.04.2"
ubuntu_iso_file = "ubuntu-22.04.2-live-server-amd64.iso"
ubuntu_version = "22.04.4"
ubuntu_iso_file = "ubuntu-22.04.4-live-server-amd64.iso"

0 comments on commit b203552

Please sign in to comment.