<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>docker | rael.io</title><link>https://rael.io/categories/docker/</link><atom:link href="https://rael.io/categories/docker/index.xml" rel="self" type="application/rss+xml"/><description>docker</description><generator>Source Themes Academic (https://sourcethemes.com/academic/)</generator><language>en-us</language><copyright>Fork me on [GitHub](https://github.com/raelga/rael.io)</copyright><lastBuildDate>Mon, 04 Mar 2019 11:23:56 +0200</lastBuildDate><image><url>https://rael.io/img/photos/emma-hello-card.jpg</url><title>docker</title><link>https://rael.io/categories/docker/</link></image><item><title>Docker wordpress</title><link>https://rael.io/project/docker-wordpress/</link><pubDate>Mon, 04 Mar 2019 11:23:56 +0200</pubDate><guid>https://rael.io/project/docker-wordpress/</guid><description>
&lt;p&gt;Dockerfile for Wordpress with some plugin/theme management.&lt;/p&gt;
&lt;p&gt;Available at &lt;a href=&#34;https://gcr.io/raelga/wordpress&#34; target=&#34;_blank&#34;&gt;gcr.io/raelga/wordpress:latest&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;dockerfile&#34;&gt;Dockerfile&lt;/h2&gt;
&lt;h3 id=&#34;stage-wp-plugins&#34;&gt;Stage: wp-plugins&lt;/h3&gt;
&lt;p&gt;Downloads form GitHub the plugins listed in &lt;a href=&#34;context/plugins.list&#34; target=&#34;_blank&#34;&gt;context/plugins.list&lt;/a&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;raelga/wp-mailgun:1.7.1
wpCloud/wp-stateless:2.2.6
WP2Static/wp2static:6.6.5
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The format is: &lt;code&gt;&amp;lt;github-username&amp;gt;/&amp;lt;github-repo&amp;gt;:&amp;lt;github-tag&amp;gt;&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&#34;stage-wp&#34;&gt;Stage: wp&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Copies the content from &lt;a href=&#34;context/wp-content&#34; target=&#34;_blank&#34;&gt;context/wp-content&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Copies the plugins from the &lt;code&gt;wp-plugins&lt;/code&gt; stage to the wp plugins folder.&lt;/li&gt;
&lt;li&gt;Adds some php optimizations&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;output&#34;&gt;Output&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;docker build -t cms.bigot.es:7c4311f -f cms.bigot.es/Dockerfile cms.bigot.es/context
Sending build context to Docker daemon 3.936MB
Step 1/7 : FROM bash:5.0 as wp-plugins
---&amp;gt; f63c4bf22009
Step 2/7 : ADD plugins.list /tmp/wp-plugins/plugins.list
---&amp;gt; 263f808fe293
Step 3/7 : RUN while read plugin || [ -n &amp;quot;$plugin&amp;quot; ]; do wget -q -O - https://github.com/${plugin/\:*/}/archive/${plugin/*:/}.tar.gz | tar zx -C /tmp/wp-plugins &amp;amp;&amp;amp; echo &amp;quot;Plugin ${plugin} downloaded.&amp;quot;; done &amp;lt; /tmp/wp-plugins/plugins.list
---&amp;gt; Running in f5217e97b99c
Plugin raelga/wp-mailgun:1.7.1 downloaded.
Plugin wpCloud/wp-stateless:2.2.6 downloaded.
Plugin WP2Static/wp2static:6.6.5 downloaded.
Removing intermediate container f5217e97b99c
---&amp;gt; a639b006aec8
Step 4/7 : FROM wordpress:5.1
---&amp;gt; d3a744e0e523
Step 5/7 : COPY --chown=www-data wp-content /var/www/html/wp-content
---&amp;gt; Using cache
---&amp;gt; 3649a2f4204b
Step 6/7 : COPY --from=wp-plugins --chown=www-data /tmp/wp-plugins /var/www/html/wp-content/plugins/
---&amp;gt; 24191ed6bb75
Step 7/7 : RUN { mv $PHP_INI_DIR/php.ini-production $PHP_INI_DIR/php.ini; echo &#39;opcache.memory_consumption=64&#39;; echo &#39;opcache.max_accelerated_files=4000&#39;; echo &#39;opcache.revalidate_freq=10&#39;; } &amp;gt; /usr/local/etc/php/conf.d/opcache-recommended.ini
---&amp;gt; Running in d1f3bd26f718
Removing intermediate container d1f3bd26f718
---&amp;gt; e86ce9bed1cc
Successfully built e86ce9bed1cc
Successfully tagged cms.bigot.es:7c4311f
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;dockerfile-onbuild&#34;&gt;Dockerfile.onbuild&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;Dockerfile.onbuild&lt;/code&gt; builds the &lt;code&gt;gcr.io/raelga/wordpress:latest&lt;/code&gt; image with some ONBUILD triggers, to copy the wp-context and download the plugins from the &lt;code&gt;plugins.list&lt;/code&gt; on build when used as &lt;code&gt;FROM&lt;/code&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ cat Dockerfile
FROM gcr.io/raelga/wordpress:latest
$ docker build -t example-wp -f Dockerfile context/
Sending build context to Docker daemon 3.936MB
Step 1/1 : FROM gcr.io/raelga/wordpress:latest
latest: Pulling from raelga/wordpress
27833a3ba0a5: Already exists
2d79f6773a3c: Already exists
f5dd9a448b82: Already exists
95719e57e42b: Already exists
cc75e951030f: Already exists
78873f480bce: Already exists
1b14116a29a2: Already exists
ea69a25cac2e: Already exists
2dbd1202c78e: Already exists
22cefd01eafa: Already exists
21da110f3a63: Already exists
0c1e476df271: Already exists
70a74d14ca92: Already exists
6590e4467d09: Already exists
1b0635fe52ca: Already exists
ccb00f7ad0b4: Already exists
996d17ef73fc: Already exists
2aa80255fade: Already exists
6a6dca4d800a: Already exists
1674e86caa8e: Pull complete
Digest: sha256:e010adc7d5789b75e86e2799bb08e7baec225750d6dce34ef14be2b4ae507d85
Status: Downloaded newer image for gcr.io/raelga/wordpress:latest
# Executing 3 build triggers
---&amp;gt; Running in bdd18a2ac418
######################################################################## 100.0%
Plugin raelga/wp-mailgun:1.7.1 downloaded.
######################################################################## 100.0%
Plugin wpCloud/wp-stateless:2.2.6 downloaded.
######################################################################## 100.0%
Plugin WP2Static/wp2static:6.6.5 downloaded.
Removing intermediate container bdd18a2ac418
---&amp;gt; 3b0c87eb6eb5
Successfully built 3b0c87eb6eb5
Successfully tagged example-wp:latest
&lt;/code&gt;&lt;/pre&gt;</description></item><item><title>Docker cats</title><link>https://rael.io/project/docker-cats/</link><pubDate>Sun, 11 Nov 2018 11:23:56 +0200</pubDate><guid>https://rael.io/project/docker-cats/</guid><description>&lt;p&gt;Simple docker images that show an image of a cat, the tag is the cat name:&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://cloud.docker.com/u/raelga/repository/docker/raelga/cats&#34; target=&#34;_blank&#34;&gt;https://cloud.docker.com/u/raelga/repository/docker/raelga/cats&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Use them with:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;docker push raelga/cats:cat-name&lt;/code&gt;&lt;/p&gt;</description></item></channel></rss>