This repository has been archived on 2020-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
quay/static/tutorial/create-container.html

25 lines
1.1 KiB
HTML
Raw Normal View History

<p>The first step to creating an image is to create a container and fill it with some data.</p>
<p>First we'll create a container with a single new file based off of the <code>ubuntu</code> base image:</p>
<pre class="command">
<code ng-show="tour.tourScope.showSudo">sudo </code>docker run busybox echo "fun" > newfile
</pre>
<p>The container will immediately terminate (because its one command is <code>echo</code>), so we'll use <code>docker ps -l</code> to list it:
<pre class="command">
<code ng-show="tour.tourScope.showSudo">sudo </code>docker ps -l
2014-11-24 21:07:38 +00:00
CONTAINER ID IMAGE COMMAND CREATED
<var class="var1">07f2065197ef</var> ubuntu:12.04 echo fun 31 seconds ago
</pre>
<div class="alert alert-info">
<div class="control-group">
<label class="control-label" for="containerId">Enter the container ID returned:</label>
<div class="form-inline">
<input type="text" id="containerId" class="form-control" placeholder="containerId" ng-model="tour.tourScope.containerId">
</div>
</div>
</div>