-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove temp fix for npm package git branches
- Loading branch information
1 parent
f29c6df
commit 7676fe2
Showing
1 changed file
with
18 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,19 @@ | ||
# Stage 1 - Gather dependencies | ||
#FROM node:19 AS deps | ||
#COPY . . | ||
#RUN npm ci | ||
|
||
# Stage 2 - Runner | ||
#FROM node:20-alpine as runner | ||
FROM node:20 | ||
# RUN git config --global url."https://github.com/".insteadOf '[email protected]:' | ||
# RUN git config --global url."https://github.com/".insteadOf [email protected]: | ||
# RUN git config --global url."https://".insteadOf git:// | ||
#RUN git config --global url."https://github.com/".insteadOf ssh://[email protected] | ||
# RUN git config --global url."https://github.com".insteadOf "ssh://[email protected]" | ||
# NOTE to self: I got this to work (i.e., fixed the problem with the docker build | ||
# not being able to pull the status dependency - | ||
# digitalcredentials/credential-status-manager-db#initial-implementation | ||
# from git ) by instead pulling in the dependency locally so it gets copied | ||
# directly into the docker build as part of copying in all of the local node_modules. | ||
# I also therefore had to remove node_moduels from the dockerignore | ||
FROM node:19 as builder | ||
ADD . /app | ||
ENV NODE_ENV=production | ||
WORKDIR /app | ||
COPY . . | ||
CMD ["node", "server.js"] | ||
EXPOSE 4008 | ||
RUN npm install | ||
|
||
FROM gcr.io/distroless/nodejs18-debian11 | ||
COPY --from=builder /app/node_modules /app/node_modules | ||
COPY --from=builder /app/server.js /app/server.js | ||
COPY --from=builder /app/src /app/src | ||
COPY --from=builder /app/package.json /app/package.json | ||
|
||
# COPY --from=builder /app/healthcheck.js /app/healthcheck.js | ||
# The healthcheck can be run from here, but also from the compose file | ||
# HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 CMD ["/nodejs/bin/node", "app/healthcheck.js"] | ||
|
||
CMD ["app/server.js"] | ||
|
||
EXPOSE 4006 |