Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F8392775
docker-run-start.erb
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
docker-run-start.erb
View Options
<%
if
@before_start
-%>
<%=
@before_start
%>
<%
end
-%>
<%
if
@remove_container_on_start
-%>
/usr/bin/
<%=
@docker_command
%>
rm
<%
if
@remove_volume_on_start
%>
-v
<%
end
%>
<%=
@sanitised_title
%>
>/dev/null 2>&1
<%
end
-%>
<%
if
@pull_on_start
-%>
/usr/bin/
<%=
@docker_command
%>
pull
<%=
@image
%>
<%
end
-%>
<%
if
@verify_digest
-%>
digest_local=$(docker image inspect
<%=
@image
%>
--format='{{index .RepoDigests 0}}')
digest_verify="
<%=
@verify_digest
%>
"
if [ "${digest_local##*:}" != "${digest_verify##*:}" ]; then
echo "Digest verify failed! Expected checksum 'sha256:$digest_verify' does not match with local checksum 'sha256:$digest_local'!"
exit 2
fi
<%
end
-%>
/usr/bin/
<%=
@docker_command
%>
create \
<%=
@docker_run_flags
%>
\
--name
<%=
@sanitised_title
%>
\
<%=
@image
%>
<%
if
@command
%>
\
<%=
@command
%><%
end
%>
<%
if
@after_create
%><%=
@after_create
%><%
end
%>
<%
if
@net
.
is_a?
Array
%>
<%
@net
.
each
do
|
n
|
%>
/usr/bin/
<%=
@docker_command
%>
network connect
<%=
n
%>
<%=
@sanitised_title
%>
<%
end
%>
<%
end
%>
/usr/bin/
<%=
@docker_command
%>
start
<%
if
!
@valid_detach
%>
-a
<%
end
%>
<%=
@sanitised_title
%>
<%
if
@after_start
-%>
<%=
@after_start
%>
<%
end
-%>
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Jun 4 2025, 7:02 PM (10 w, 1 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3308212
Attached To
R205 puppet-puppetlabs-docker
Event Timeline
Log In to Comment