diff --git a/.drone.yml b/.drone.yml index 81ebc5c..540253b 100644 --- a/.drone.yml +++ b/.drone.yml @@ -34,10 +34,17 @@ steps: # 定义管道的执行步骤 tags: - latest + - name: install + image: node:18 + pull: if-not-exists + depends_on: [build-tags] + commands: + - npm install + - name: build-image image: plugins/docker pull: if-not-exists - depends_on: [build-tags] + depends_on: [install] settings: username: from_secret: docker_username diff --git a/Dockerfile b/Dockerfile index d0caa1b..ee0cc5f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,8 +5,7 @@ WORKDIR /app # COPY package*.json ./ COPY . . - -RUN npm --registry https://registry.npm.taobao.org install +# RUN npm --registry https://registry.npm.taobao.org install EXPOSE 8080