Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Docker Image#1137

felipeavilis started this conversation inGeneral
Nov 13, 2024· 0 comments
Discussion options

Hi all!

I wanna share it with u that i just created a docker image foruWebSockets.js and the image size is about 405MB. I think it could be smaller, but i dont know how to do it. Any of you has a smaller image? I realy would like to optimize it.

Here are myDockerfile andpackage.json.

FROM node:21-alpine3.18WORKDIR /opt/wsserverCOPY package*.json ./RUN mkdir -p /opt/wsserver/node_modulesRUN chown -R node:node /opt/wsserverRUN apk updateRUN apk add --no-cache gcompat git libc6-compat bashUSER nodeRUN npm installCOPY --chown=node:node . .EXPOSE 9001CMD [ "node", "src/main.js" ]
{  "name": "my-wsserver",  "version": "0.0.1",  "description": "",  "main": "src/main.js",  "scripts": {    "test": "echo \"Error: no test specified\" && exit 1"  },  "author": "",  "license": "ISC",  "dependencies": {    "path": "^0.12.7",    "sqlite3": "^5.1.7",    "uuid": "^9.0.1",    "winston": "^3.13.0",    "dotenv": "^16.4.5",    "uWebSockets.js": "github:uNetworking/uWebSockets.js#v20.43.0"  }}
You must be logged in to vote

Replies: 0 comments

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
General
Labels
None yet
1 participant
@felipeavilis

[8]ページ先頭

©2009-2025 Movatter.jp