Skip to content

Commit c5c8851

Browse files
authored
Merge pull request CenterForOpenScience#253 from bp-cos/feature/docker-image
Added a new docker image for development
2 parents 7f699eb + 2ab5734 commit c5c8851

6 files changed

Lines changed: 24950 additions & 27 deletions

File tree

.dockerignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules
2+
dist
3+
.git
4+
.DS_Store

Dockerfile

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,25 @@ WORKDIR /code
1818

1919
COPY --from=build /app/dist /code/dist
2020

21-
# Dev
21+
# Dev - run only
2222
FROM build AS dev
2323

2424
EXPOSE 4200
2525

2626
CMD ["ng", "serve"]
27+
28+
# Local Development - coding
29+
FROM node:22-alpine AS local-dev
30+
# FROM node:20-bullseye AS local-dev
31+
WORKDIR /app
32+
33+
# Upgrade npm to include the fix
34+
RUN npm i -g npm@11.5.2
35+
36+
# Install deps in the image (kept in container)
37+
COPY package.json ./
38+
COPY package-lock.docker.json ./package-lock.json
39+
RUN npm ci --no-audit --no-fund
40+
41+
# Expose Angular dev server
42+
EXPOSE 4200

0 commit comments

Comments
 (0)