Skip to content

Commit

Permalink
Fixes Azure#2361
Browse files Browse the repository at this point in the history
 * Upgrade docker base image to node:20-alpine3.19
 * Upgrade tedious to 16.7.1 that supports node 20
 * Moved npm prepare script to prepack, prepublishOnly & postinstallas & added `--ignore-scripts` as prepare does not respect `--ignore-scripts` see npm/cli#3707
  • Loading branch information
justinwyer committed Mar 22, 2024
1 parent d544d16 commit a8580fd
Show file tree
Hide file tree
Showing 4 changed files with 133 additions and 327 deletions.
2 changes: 2 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Blob:
- Fixed issue of setting blob tag should not update Blob Etag and LastModified. (issue #2327)
- Fix HTTP header parsing of `SubmitBatch()`. If a HTTP header has HTTP header delimiter (`:`) in its value, `SubmitBatch()` returns "400 One of the request inputs is not valid". For example, if `user-agent` header is `azsdk-cpp-storage-blobs/12.10.0-beta.1 (Darwin 23.1.0 arm64 Darwin Kernel Version 23.1.0: Mon Oct 9 21:28:12 PDT 2023; root:xnu-10002.41.9~6/RELEASE_ARM64_T8103)`, all `SubmitBatch()` requests are failed.
- Fixed issue of blob copying succeed without 'r' permission in source blob's SAS token credential.
- Docker base image to upgraded to node:20-alpine3.19
- Tedious upgraded to 16.7.1

## 2023.12 Version 3.29.0

Expand Down
14 changes: 8 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# Builder
#
FROM node:14-alpine3.17 AS builder
FROM node:20-alpine3.19 AS builder

WORKDIR /opt/azurite

Expand All @@ -11,16 +11,17 @@ COPY *.json LICENSE NOTICE.txt ./
# Copy the source code and build the app
COPY src ./src
COPY tests ./tests
RUN npm config set unsafe-perm=true && \
npm ci
RUN npm ci
RUN npm run build && \
npm install -g --loglevel verbose


#
# Production image
#
FROM node:14-alpine3.17
FROM node:20-alpine3.19

RUN apk update && apk upgrade --no-cache

ENV NODE_ENV=production

Expand All @@ -33,8 +34,9 @@ COPY package*.json LICENSE NOTICE.txt ./

COPY --from=builder /opt/azurite/dist/ dist/

RUN npm config set unsafe-perm=true && \
npm install -g --loglevel verbose
RUN npm update -g
RUN npm install --ignore-scripts --loglevel verbose
RUN npm install -g --ignore-scripts --loglevel verbose

# Blob Storage Port
EXPOSE 10000
Expand Down

0 comments on commit a8580fd

Please sign in to comment.