Sha256: bcad6f3dc4f505f4f0177dac1f6029e3efba3e7b6553c3e83e1c06886cc3d900

Contents?: true

Size: 665 Bytes

Versions: 1

Compression:

Stored size: 665 Bytes

Contents

ARG NODE_VERSION=<%= node_version %>

FROM node:$NODE_VERSION-slim as client

WORKDIR /rails/<%= api_client_dir %>

ENV NODE_ENV=production

# Install node modules
COPY <%= api_client_files.join(' ') %> .
<% if api_client_files.join.include? 'yarn' -%>
<% if options.cache? -%>
RUN --mount=type=cache,id=bld-yarn-cache,target=/root/.yarn \
    YARN_CACHE_FOLDER=/root/.yarn yarn install
<% else -%>
RUN yarn install
<% end -%>
<% else -%>
<% if options.cache? -%>
RUN --mount=type=cache,id=bld-yarn-cache,target=/root/.npm \
    npm install
<% else -%>
RUN npm install
<% end -%>
<% end -%>

# build client application
COPY <%= api_client_dir %> .
RUN npm run build

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dockerfile-rails-0.4.1 lib/generators/templates/_node_client.erb