Team-Silver-Sphere / SquadJS

Squad Server Script Framework
Boost Software License 1.0
166 stars 125 forks source link

Dockerfile and Action for creating Docker image in GitHub's registry #317

Open Sentennial opened 1 year ago

sullivandavid42 commented 6 months ago

Any update about this merge request ? Would be glad to see this container in action ! :)

werewolfboy13 commented 6 months ago

@sullivandavid42 legit didn’t know this was a PR. The docker file at a minimum is broken as such I can’t push this. Will make a change request when I can.

wojski commented 6 months ago

Yes, you don't need to install nodejs / pm2 in your system. Its just an option if somebody want to run it via docker (For example we are running it in docker from day 0)

wojski commented 6 months ago

Working dockerfile if anyone need ;)

FROM node:18.17-alpine
USER node
RUN mkdir -p /home/node/app
WORKDIR /home/node/app
COPY --chown=node . .
RUN yarn install && yarn cache clean
CMD ["node", "index.js"]
D4n2021 commented 6 months ago

Working dockerfile if anyone need ;)

FROM node:18.17-alpine
USER node
RUN mkdir -p /home/node/app
WORKDIR /home/node/app
COPY --chown=node . .
RUN yarn install && yarn cache clean
CMD ["node", "index.js"]

So is this for Windows aswell then or just Linux? Because here it only lists Linux, although top right says "multiplatform".

grafik

fantinodavide commented 6 months ago

Working dockerfile if anyone need ;)

FROM node:18.17-alpine
USER node
RUN mkdir -p /home/node/app
WORKDIR /home/node/app
COPY --chown=node . .
RUN yarn install && yarn cache clean
CMD ["node", "index.js"]

So is this for Windows aswell then or just Linux?

Docker works on Linux and Windows (on WSL) and the docker image is used to standardize the environment that will run an application, regardless of the OS.

D4n2021 commented 6 months ago

Just edited my previous post.

fantinodavide commented 6 months ago

Just edited my previous post.

This is becoming off-topic but I can suggest to read this page in which everything is very well explained: https://docs.docker.com/get-started/overview/ If you need more clarifications I also suggest to move this conversation on discord, feel free to DM me, my username is jetdave