# This file is generated by Nx.
# Build the docker image with `npx nx docker:build <%= project %>`.
# Tip: Modify "docker:build" options in project.json to change docker build args.
#<% if (skipDockerPlugin) { %>
# Run the container with `docker run -p 3000:3000 -t <%= sanitizedProjectName %>`.
#<% } else { %>
# Run the container with `nx docker:run <%= project %> -p 3000:3000`.
#<% } %>
FROM docker.io/node:lts-alpine

ENV HOST=0.0.0.0
ENV PORT=3000
<% if(packageManager === "pnpm" || packageManager === 'yarn') { %>
RUN corepack enable
<% } %>

WORKDIR /app

COPY <%= buildLocation %> .

# You can remove this install step if you build with `--bundle` option.
# The bundled output will include external dependencies.
<% if(packageManager === 'npm') { %>
RUN npm --omit=dev -f install
<% } else { %>
RUN <%= packageManager %> install
<% } %>
CMD [ "node", "main.js" ]
