-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
41199b2
commit 9a73921
Showing
2 changed files
with
17 additions
and
8 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
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,7 +1,19 @@ | ||
FROM node:20.9-alpine AS build | ||
FROM ubuntu | ||
SHELL ["/bin/bash", "-c"] | ||
ENV NVM_DIR /usr/local/.nvm | ||
ENV NODE_VERSION v18.16 | ||
RUN mkdir $NVM_DIR | ||
RUN cat /etc/resolv.conf | ||
RUN apt-get update && apt-get -y install curl | ||
RUN curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash | ||
ENV NODE_PATH $NVM_DIR/$NODE_VERSION/lib/node_modules | ||
ENV PATH $NVM_DIR/versions/node/$NODE_VERSION/bin:$PATH | ||
RUN echo "source $NVM_DIR/nvm.sh && \ | ||
nvm install $NODE_VERSION && \ | ||
nvm alias default $NODE_VERSION && \ | ||
nvm use default" | bash | ||
WORKDIR /app | ||
RUN echo "nameserver 8.8.8.8" > /etc/resolv.conf && npm install -g @angular/cli | ||
COPY package*.json ./ | ||
RUN echo "nameserver 8.8.8.8" > /etc/resolv.conf && npm install | ||
RUN echo "nameserver 8.8.8.8" > /etc/resolv.conf && npm audit fix | ||
COPY . . | ||
RUN source $NVM_DIR/nvm.sh && npm install | ||
COPY . . | ||
CMD source $NVM_DIR/nvm.sh && node_modules/.bin/ng serve --host 0.0.0.0 |