We want to use our Java docker image (tagged as 
*idealista/8u181-stretch-openjdk-headless 
<https://hub.docker.com/r/idealista/jdk/tags>* in Docker Hub) which is 
based in Debian Stretch Slim. 

This image *doesn't have systemd* (neither official image, nor our derived 
image one), so this package should be installed to be used later to 
configure our services. AFAIK, if you want to use systemd to manage 
services, this process should be the first -> should be present in Docker 
run command. But the problem is, before installation /lib/system/systemd is 
not present, so the container cannot start. This could be solved using RUN 
when you are using Dockerfiles, because that commands are executed in the 
image "build phase". You can install systemd before and execute 
/lib/system/systemd at container startup. 

We don't know how to solve this using only Packer to build our images.


El lunes, 11 de febrero de 2019, 21:12:11 (UTC+1), Rickard von Essen 
escribió:
>
> 1) RUN would be similar to use the shell provisioner.
> 2) If you mean something like COPY or ADD that would be similar to use the 
> file provisioner.
> 3) I don't think I follow what you ask for here, can you elaborate?
>
> On Mon, Feb 11, 2019 at 4:21 PM Daniel Ortega <[email protected] 
> <javascript:>> wrote:
>
>> Is it possible to use packer to replicate this Dockerfile? 
>> https://github.com/geerlingguy/docker-debian9-ansible/blob/master/Dockerfile#L9
>>
>> Basically I want to execute "Docker RUN" installating some packages (sudo 
>> and systemd) and start that container using "/lib/systemd/systemd". Is it 
>> possible? 
>>
>> The problems that I have includes:
>>
>>    1. Docker RUN is not supported (or is not described in the official 
>>    doc)
>>    2. I cannot put scripts after docker container start
>>    3. I don't know how to create a image, then tag this image and try to 
>>    start using "/lib/system/systemd"
>>
>> -- 
>> 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] <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/packer-tool/fe9fe6d9-0c25-49ae-8b5d-aec868495b36%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/packer-tool/fe9fe6d9-0c25-49ae-8b5d-aec868495b36%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/35879d9d-f633-4fb9-b143-dd6b8bbcde5d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to