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

# Install system build dependencies here

<% as_root.each do |cmd| %>
RUN <%= cmd %>
<% end %>

# Add project data

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

# Switch to cide user

USER cide

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

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

# Install system build dependencies here

<% as_root.each do |cmd| %>
RUN <%= cmd %>
<% end %>

# Add project data

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

# Switch to cide user

USER cide

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

Make sure we first run as root
Make sure we first run as root
