<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="de">
	<id>https://wiki.ixheim.de/index.php?action=history&amp;feed=atom&amp;title=Docker_Image_bauen</id>
	<title>Docker Image bauen - Versionsgeschichte</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.ixheim.de/index.php?action=history&amp;feed=atom&amp;title=Docker_Image_bauen"/>
	<link rel="alternate" type="text/html" href="https://wiki.ixheim.de/index.php?title=Docker_Image_bauen&amp;action=history"/>
	<updated>2026-06-28T20:49:01Z</updated>
	<subtitle>Versionsgeschichte dieser Seite in Xinux Wiki</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>https://wiki.ixheim.de/index.php?title=Docker_Image_bauen&amp;diff=28537&amp;oldid=prev</id>
		<title>Thomas.will: Die Seite wurde neu angelegt: „=Workdir= *cd /root/apache =Dockerfile= *cat Dockerfile &lt;pre&gt; #Baseimage ubuntu 18:04 FROM ubuntu:18.04 #we are the maintainer  MAINTAINER technik@xinux.de #on…“</title>
		<link rel="alternate" type="text/html" href="https://wiki.ixheim.de/index.php?title=Docker_Image_bauen&amp;diff=28537&amp;oldid=prev"/>
		<updated>2021-10-05T11:02:35Z</updated>

		<summary type="html">&lt;p&gt;Die Seite wurde neu angelegt: „=Workdir= *cd /root/apache =Dockerfile= *cat Dockerfile &amp;lt;pre&amp;gt; #Baseimage ubuntu 18:04 FROM ubuntu:18.04 #we are the maintainer  MAINTAINER technik@xinux.de #on…“&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Neue Seite&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=Workdir=&lt;br /&gt;
*cd /root/apache&lt;br /&gt;
=Dockerfile=&lt;br /&gt;
*cat Dockerfile&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#Baseimage ubuntu 18:04&lt;br /&gt;
FROM ubuntu:18.04&lt;br /&gt;
#we are the maintainer &lt;br /&gt;
MAINTAINER technik@xinux.de&lt;br /&gt;
#only run at built&lt;br /&gt;
RUN  apt-get update &amp;amp;&amp;amp; apt-get install -y apache2  &amp;amp;&amp;amp; apt-get clean&lt;br /&gt;
RUN  cp -ar /etc/apache2 /tmp&lt;br /&gt;
RUN  cp -ar /var/www/html /tmp&lt;br /&gt;
COPY start.sh /&lt;br /&gt;
#exposed ports&lt;br /&gt;
EXPOSE 80&lt;br /&gt;
EXPOSE 443&lt;br /&gt;
#command that execute in the container &lt;br /&gt;
CMD [&amp;quot;bash&amp;quot;, &amp;quot;/start.sh&amp;quot;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=our start script=&lt;br /&gt;
when we initiate the container and mount the volumes manually, this directories cover the original ones in the container.&lt;br /&gt;
&lt;br /&gt;
so they are empty. in this start script, we copy the file structure that we need to start our demon to the right directories.&lt;br /&gt;
*cat start.sh&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
if ! test -f /var/www/html/index.html&lt;br /&gt;
then &lt;br /&gt;
cp -ar /tmp/html/* /var/www/html/&lt;br /&gt;
fi  &lt;br /&gt;
if ! test -f /etc/apache2/apache2.conf&lt;br /&gt;
then &lt;br /&gt;
cp -ar /tmp/apache2/* /etc/apache2/&lt;br /&gt;
fi &lt;br /&gt;
/usr/sbin/apachectl -D FOREGROUND&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=building the image=&lt;br /&gt;
*docker build -t im-apache .&lt;/div&gt;</summary>
		<author><name>Thomas.will</name></author>
	</entry>
</feed>