Skip to content

Commit 6bdb7f4

Browse files
Fix Dockerfile to set WORKDIR before run npm install
1 parent 1b3b132 commit 6bdb7f4

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

packages/server/Dockerfile

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
FROM node:16-slim
2-
2+
LABEL description="Triple Pattern Fragment Server."
33
# Install location
44
ENV dir /var/www/@ldf/server
55

@@ -16,16 +16,18 @@ RUN npm config set @ldf:registry $NPM_REGISTRY
1616
# Install the node module
1717
RUN apt-get update && \
1818
apt-get install -y g++ make python && \
19-
cd ${dir} && npm install --only=production && \
20-
apt-get remove -y g++ make python && apt-get autoremove -y && \
19+
cd ${dir}
20+
21+
WORKDIR ${dir}
22+
RUN npm install --only=production
23+
RUN apt-get remove -y g++ make python && apt-get autoremove -y && \
2124
rm -rf /var/cache/apt/archives
2225

2326
# Expose the default port
2427
EXPOSE 3000
2528

2629
# Run base binary
27-
WORKDIR ${dir}
2830
ENTRYPOINT ["node", "bin/ldf-server"]
2931

3032
# Default command
31-
CMD ["--help"]
33+
CMD ["--help"]

0 commit comments

Comments
 (0)