diff --git a/Dockerfile b/Dockerfile index 7776393..2b8503f 100755 --- a/Dockerfile +++ b/Dockerfile @@ -5,12 +5,16 @@ LABEL maintainer="Mike Glenn " LABEL ilude-project=joyride RUN \ - mkdir -p /app /usr/local/etc \ + mkdir -p /app /etc \ && { \ echo 'install: --no-document'; \ echo 'update: --no-document'; \ - } >> /usr/local/etc/gemrc \ - && apk add --no-cache bash shadow tzdata \ + } >> /etc/gemrc \ + && apk add --no-cache \ + bash \ + dnsmasq \ + shadow \ + tzdata \ && rm -rf \ /usr/lib/ruby/gems/*/cache/* \ /root/.gem/ \ @@ -18,19 +22,9 @@ RUN \ /tmp/* \ /var/tmp/* -ARG USER=anvil -ENV USER=${USER} -ARG PUID=1000 -ARG PGID=1000 ENV APP /app ENV GEM_HOME /gems -RUN \ - groupadd -g $PGID $USER && \ - useradd -s /sbin/nologin -g $PGID -u $PUID -d /home/$USER $USER && \ - mkdir -p /home/anvil && \ - chown $USER:$USER $APP - WORKDIR $APP COPY --chmod=755 <<-"EOF" /usr/local/bin/docker-entrypoint.sh @@ -65,5 +59,3 @@ FROM base AS production COPY --from=builder ${GEM_HOME} ${GEM_HOME} COPY ./app $APP - -USER $USER \ No newline at end of file diff --git a/app/template.rb b/app/template.rb index 17ff02b..5b37fb1 100755 --- a/app/template.rb +++ b/app/template.rb @@ -11,7 +11,7 @@ def initialize(output_path, template_path, log = Logger.new(stdout)) end def write_template(template_context={}) - erb = ERB.new(File.open(template_path).read, 0, "<>") + erb = ERB.new(File.open(template_path).read) output = erb.result(TemplateContext.new(template_context).get_binding) File.write(output_path, output) rescue => ex