Sha256: d84f2a890ffc24ad30a369040633326f321d3ffb845bcf0d78dee55a10f00090

Contents?: true

Size: 1.23 KB

Versions: 12

Compression:

Stored size: 1.23 KB

Contents

FROM <%= from %>
USER root
RUN useradd -m -U -d <%= CIDE_DIR %> cide

# Install system build dependencies here

<% if as_root -%>
  <% as_root.add.each do |file| -%>
ADD <%= file.src.join(' ') %> <%= file.dest %>
  <% end -%>
  <% as_root.env.each_pair do |key, value| -%>
ENV <%= key %> <%= value %>
  <% end -%>
  <% as_root.run.each do |cmd| -%>
RUN <%= cmd %>
  <% end -%>
<% end -%>

# Common

ENV HOME <%= CIDE_DIR %>
WORKDIR <%= CIDE_SRC_DIR %>

# SSH config

<% if use_ssh -%>
RUN mkdir <%= CIDE_SSH_DIR %>
RUN echo StrictHostKeyChecking no > <%= File.join(CIDE_SSH_DIR, 'config') %>
RUN chmod 400 <%= File.join(CIDE_SSH_DIR, 'config') %>

ADD <%= TEMP_SSH_KEY %> <%= File.join(CIDE_SSH_DIR, 'id_rsa') %>
RUN chmod 400 <%= File.expand_path('id_rsa', CIDE_SSH_DIR) %>
RUN chown -R cide:cide <%= CIDE_DIR %>
<% end -%>

# Before

<% if before -%>
  <% before.add.each do |file| -%>
ADD <%= file.src.join(' ') %> <%= file.dest %>
  <% end %>
RUN chown -R cide:cide <%= CIDE_DIR %>
  <% before.env.each_pair do |key, value| -%>
ENV <%= key %> <%= value %>
  <% end %>
USER cide
  <% before.run.each do |cmd| -%>
RUN <%= cmd %>
  <% end %>
<% end -%>

# Add project data

USER root
ADD . <%= CIDE_SRC_DIR %>
RUN chown -R cide:cide <%= CIDE_DIR %>
USER cide

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
cide-0.9.1 lib/cide/dockerfile_template.erb
cide-0.9.0 lib/cide/dockerfile_template.erb
cide-0.8.1 lib/cide/dockerfile_template.erb
cide-0.8.0 lib/cide/dockerfile_template.erb
cide-0.7.0 lib/cide/dockerfile_template.erb
cide-0.6.3 lib/cide/dockerfile_template.erb
cide-0.6.2 lib/cide/dockerfile_template.erb
cide-0.6.1 lib/cide/dockerfile_template.erb
cide-0.6.0 lib/cide/dockerfile_template.erb
cide-0.5.0 lib/cide/dockerfile_template.erb
cide-0.4.1 lib/cide/dockerfile_template.erb
cide-0.4.0 lib/cide/dockerfile_template.erb