mirror of
https://gitlab.com/bmcgonag/get_my.git
synced 2026-03-26 15:58:50 +00:00
Update Dockerfile proper
This commit is contained in:
parent
4de73528c4
commit
4687f27011
1 changed files with 3 additions and 14 deletions
17
Dockerfile
17
Dockerfile
|
|
@ -1,8 +1,4 @@
|
|||
FROM alpine:3.22.1
|
||||
|
||||
ENV NODE_VERSION=22.16.0
|
||||
ENV NODE_URL="https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.xz"
|
||||
ENV DIR_NODE=/usr/local
|
||||
FROM node:22.16.0-alpine
|
||||
|
||||
RUN apk add --no-cache \
|
||||
libstdc++ \
|
||||
|
|
@ -20,13 +16,6 @@ RUN apk add --no-cache \
|
|||
ccache \
|
||||
xz
|
||||
|
||||
RUN echo $NODE_URL
|
||||
RUN curl -sSL "$NODE_URL" | tar -xz -C /usr/local/ && mv $DIR_NODE/node-v${NODE_VERSION}-linux-x64 $DIR_NODE/v$NODE_VERSION
|
||||
|
||||
# add node and npm to path so the commands are available
|
||||
ENV NODE_PATH $DIR_NODE/v$NODE_VERSION/lib/node_modules
|
||||
ENV PATH $DIR_NODE/v$NODE_VERSION/bin:$PATH
|
||||
|
||||
# confirm installation
|
||||
RUN node -v
|
||||
RUN npm -v
|
||||
|
|
@ -38,11 +27,11 @@ ENV MONGO_URL=mongodb://mongo:27017/get_my\
|
|||
|
||||
RUN mkdir -p /usr/src/get_my
|
||||
WORKDIR /usr/src/get_my
|
||||
COPY bundle/ /usr/src/get_my/
|
||||
COPY ../bundle/ /usr/src/get_my/
|
||||
|
||||
RUN cd /usr/src/get_my/programs/server/ \
|
||||
&& npm install
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
CMD [ "node", "main.js" ]
|
||||
CMD [ "node", "main.js" ]
|
||||
Loading…
Add table
Add a link
Reference in a new issue