If you start docker there is a option -u <user> to select the user the
process in the container will use. If not specified it will check if there
is one defined in the image (with USER) if not default to root.

On Feb 27, 2017 22:18, "Katie Paugh" <[email protected]> wrote:

> Welp, accidentally deleted original post.
> But I figured out the issue. I'm running a Jenkins server in a Docker
> Container.
> Was getting an issue where packer wouldn't run but setting the user
> variable while root fixed the issue.
> Not sure why Jenkins is running as root but thats a different issue.
>
> Thanks!
>
> On Monday, February 27, 2017 at 4:05:08 PM UTC-5, Rickard von Essen wrote:
>>
>> Could you provide some more context here? Give us a example packer
>> template (.json) and what do you mean with a container ? a docker
>> container, if so can you specify the command you started it with.
>>
>> It might just be that env var USER is not set. If I run: docker run -it
>> ubuntu:trusty bash  USER is not set. You could just define it.
>>
>> // Rickard
>>
>> On 27 February 2017 at 21:28, Katie Paugh <[email protected]> wrote:
>>
>>> Trying to run packer inside of a Container. I keep getting the error:
>>>>
>>>> * user: could not determine current user from environment.
>>>>
>>>>
>>>>
>>> It runs fine from the host that manages the Container but I get the
>>> error when running within the Container.
>>>
>>> Any ideas? Can I define the user?
>>>
>>> --
>>> 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 [email protected].
>>> To view this discussion on the web visit https://groups.google.com/d/ms
>>> gid/packer-tool/367851ee-7cd9-4a0c-a664-f2138beaed71%40googlegroups.com
>>> <https://groups.google.com/d/msgid/packer-tool/367851ee-7cd9-4a0c-a664-f2138beaed71%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
> 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 [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/packer-tool/1be5ec3e-2bf9-44b8-b329-64fadd45f39d%40googlegroups.com
> <https://groups.google.com/d/msgid/packer-tool/1be5ec3e-2bf9-44b8-b329-64fadd45f39d%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/CALz9Rt8LE%3D4s5fpR7JAZTALcGoE7QXm5WVe%2BBfoXfLk7OpYyHg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to