From 9c3c402e098dbf591282db7464e303ac2472f6fc Mon Sep 17 00:00:00 2001 From: Rosen Rusinov Date: Wed, 13 Mar 2024 10:21:05 +0100 Subject: [PATCH] Update Dockerfile --- .dockerignore | 3 +++ .gitignore | 2 +- Dockerfile | 20 ++++++++++++++------ 3 files changed, 18 insertions(+), 7 deletions(-) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000000..d9f301aab9 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,3 @@ +.git +coverage +node_modules \ No newline at end of file diff --git a/.gitignore b/.gitignore index c0f6fc65b2..280304cd62 100644 --- a/.gitignore +++ b/.gitignore @@ -18,7 +18,7 @@ sim/web/__debug_bin # temporary files *.results.tmp -.dockerignore +#.dockerignore /cata/ *.code-workspace wowsimcata diff --git a/Dockerfile b/Dockerfile index 32062dd364..c6cac2517b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,18 +6,26 @@ WORKDIR /cata COPY . . COPY gitconfig /etc/gitconfig +RUN rm /bin/sh && ln -s /bin/bash /bin/sh + RUN apt-get update RUN apt-get install -y protobuf-compiler RUN go get -u google.golang.org/protobuf RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@latest -RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash - -ENV NODE_VERSION=19.8.0 +ENV NODE_VERSION=20.11.1 ENV NVM_DIR="/root/.nvm" -RUN . "$NVM_DIR/nvm.sh" && nvm install ${NODE_VERSION} -RUN . "$NVM_DIR/nvm.sh" && nvm use v${NODE_VERSION} -RUN . "$NVM_DIR/nvm.sh" && nvm alias default v${NODE_VERSION} + +RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash \ + && . $NVM_DIR/nvm.sh \ + && nvm install $NODE_VERSION \ + && nvm alias default $NODE_VERSION \ + && nvm use default + +#RUN . "$NVM_DIR/nvm.sh" && nvm install ${NODE_VERSION} +#RUN . "$NVM_DIR/nvm.sh" && nvm use v${NODE_VERSION} +#RUN . "$NVM_DIR/nvm.sh" && nvm alias default v${NODE_VERSION} + ENV PATH="/root/.nvm/versions/node/v${NODE_VERSION}/bin/:${PATH}" EXPOSE 8080/tcp