hi , i am trying to a gitlab-ci build using docker container


i have installed packer and when i try to execute packer build command i am 
getting an error. please help me solve this error.

My image.json file

  "variables": {
  "builders": [{
    "type": "amazon-ebs",
    "instance_type": "t2.large",
    "region": "us-east-1",
    "source_ami": "ami-d15a75c7",
    "security_group_id": "xxxxx",
    "subnet_id": "xxxxxxxxx",
    "ami_name": "gitlab-runner-as_ubuntu_docker_{{timestamp}}",
    "ssh_username": "ubuntu",
    "ssh_pty": true,
    "ssh_private_ip": true,
    "associate_public_ip_address": false,
    "shutdown_behavior": "stop",
    "ena_support": true
  "provisioners": [
      "type": "shell",
      "inline": [
        "sudo apt-get -y update",
        "sudo apt-get install -y python-simplejson",
        "sudo apt-get install -y python-requests",
        "sudo apt-get install -y python-requests",
        "sudo apt-get install python-pip -y"
      "type": "ansible",
      "ansible_env_vars": [
      "type": "shell",

$ packer -version
$ whoami
$ packer_log=1 packer build image.json
amazon-ebs output will be in this color.

1 error(s) occurred:

* user: could not determine current user from environment.
ERROR: Job failed: exit code 1

This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to packer-tool+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
For more options, visit https://groups.google.com/d/optout.

Reply via email to