Fix env issue
Some checks failed
Build and Publish Docker Image / build_and_push (push) Failing after 4s
Some checks failed
Build and Publish Docker Image / build_and_push (push) Failing after 4s
This commit is contained in:
@@ -17,8 +17,7 @@ COPY package*.json tsconfig.json .npmrc ./
|
|||||||
|
|
||||||
# Install
|
# Install
|
||||||
ARG NPM_TOKEN
|
ARG NPM_TOKEN
|
||||||
ENV NPM_TOKEN ${NPM_TOKEN}
|
RUN npm install --//npm.token=${NPM_TOKEN}
|
||||||
RUN npm install
|
|
||||||
|
|
||||||
# Copy the app
|
# Copy the app
|
||||||
COPY src ./src
|
COPY src ./src
|
||||||
@@ -32,8 +31,7 @@ FROM node:lts-alpine
|
|||||||
# Install dependencies but skip dev dependencies
|
# Install dependencies but skip dev dependencies
|
||||||
COPY --from=build /app/package*.json /app/.npmrc ./
|
COPY --from=build /app/package*.json /app/.npmrc ./
|
||||||
ARG NPM_TOKEN
|
ARG NPM_TOKEN
|
||||||
ENV NPM_TOKEN ${NPM_TOKEN}
|
RUN npm install --only=production --//npm.token=${NPM_TOKEN}
|
||||||
RUN npm install --only=production
|
|
||||||
|
|
||||||
# Copy the app
|
# Copy the app
|
||||||
COPY --from=build /app/dist ./dist
|
COPY --from=build /app/dist ./dist
|
||||||
|
|||||||
@@ -51,7 +51,8 @@ fi
|
|||||||
|
|
||||||
# cd to the project root directory.
|
# cd to the project root directory.
|
||||||
cd "$(dirname "$0")/.."
|
cd "$(dirname "$0")/.."
|
||||||
docker build -t butlerbot:$VERSION .
|
source .env
|
||||||
|
docker build --build-arg NPM_TOKEN=$NPM_TOKEN -t butlerbot:$VERSION .
|
||||||
|
|
||||||
# Tag the Docker image.
|
# Tag the Docker image.
|
||||||
for TAG in "${TAGS[@]}"; do
|
for TAG in "${TAGS[@]}"; do
|
||||||
|
|||||||
Reference in New Issue
Block a user