You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge the "release/v1.0.2" branch to the "main" branch
This merge brings release/v1.0.2 into main and includes both the Docker runtime extraction refactor and the 1.0.2 version bump. The runtime stage now uses amnoorbrar/runtime-node:v1.0.0-24.13.1 instead of a manually assembled scratch-based runtime, removing explicit runtime dependency copy steps from the Dockerfile. Package metadata is aligned by updating package.json and package-lock.json from version 1.0.1 to 1.0.2 while preserving the existing application startup flow.
Copy file name to clipboardExpand all lines: Dockerfile
+2-16Lines changed: 2 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -13,26 +13,12 @@ RUN npm ci --omit=dev
13
13
# Finally, the rest of the application code is copied into the working directory. This includes all the source files needed to run the application.
14
14
COPY . .
15
15
16
-
#The base image for runtime stage is scratch, which is an empty image. This means that only the files explicitly copied from the builder stage will be included in the final image.
17
-
FROM scratch
18
-
19
-
# The necessary files and directories are copied from the builder stage to the runtime stage. The --chown=0:1000 flag sets the ownership of the files to user ID 1000 and group ID 1000, while the --chmod=550 flag sets the permissions to read and execute for the owner and group, and no permissions for others.
# The necessary shared libraries for Node.js are also copied from the builder stage to the runtime stage. This includes the musl libc dynamic linker (ld-musl-*.so.1) and the standard C++ library (libstdc++.so.6) and the GCC support library (libgcc_s.so.1). These libraries are required for Node.js to run properly in the scratch image, which does not include any base libraries.
# The Node.js binary itself is also copied from the builder stage to the runtime stage. This allows the application to run using the Node.js runtime in the scratch image.
# The base image for the runtime stage is a custom image named amnoorbrar/runtime-node:v1.0.0-24.13.1. This image is based on a Node.js runtime environment.
17
+
FROM amnoorbrar/runtime-node:v1.0.0-24.13.1
29
18
30
19
# Finally, the application files are copied from the builder stage to the runtime stage. This includes all the source files needed to run the application, and they are set with appropriate ownership and permissions for security and functionality.
# The USER instruction sets the user and group for running the application. In this case, it is set to user ID 1000 and group ID 1000, which is a common non-root user in many Linux distributions. This is a security best practice to avoid running applications as the root user.
34
-
USER 1000:1000
35
-
36
22
# The working directory is set to /application, which is where the application code is located. This means that when the container starts, it will be in this directory, and any commands will be executed from this location.
0 commit comments