Skip to content

Commit 01d9a71

Browse files
authored
Update Dockerfile
1 parent 515c052 commit 01d9a71

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

Dockerfile

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
FROM maven:3-jdk-8-alpine
1+
FROM node:18-alpine
2+
WORKDIR /app
23

3-
WORKDIR /usr/src/app
4+
# Copy mock packages
5+
COPY mock-output /mock
46

5-
COPY . /usr/src/app
6-
RUN mvn package
7-
RUN echo test > out.out
8-
ENV PORT 5000
9-
EXPOSE $PORT
10-
CMD [ "sh", "-c", "mvn -Dserver.port=${PORT} spring-boot:run" ]
7+
# Install each mock package globally
8+
RUN for d in /mock/*; do \
9+
cd "$d" && npm pack && npm install -g *.tgz; \
10+
done
11+
12+
CMD ["node", "-e", "console.log('Mock packages installed successfully')"]

0 commit comments

Comments
 (0)