Creating a Docker Image for CesiumJS

Has anyone successfully packaged CesiumJS in a docker container? I can get it to install and start but i can not get access to it from my machine via localhost:8080

I have tested this with a basic express node package and could access that web server from my machine without issue.

I’ve tried a number of different dockerfile configs but this is my current dockerfile that does install and start it but is not accessible on my machine.

FROM node:lts-alpine

#ENV NODE_ENV=production

WORKDIR /usr/src/app

COPY . .

#COPY [“package.json”, “package-lock.json*”, “npm-shrinkwrap.json*”, “./”]

RUN npm install

EXPOSE 8080

RUN chown -R node /usr/src/app

USER node

CMD [“npm”, “start”]

Hi @JustXtreme

Just to double check, are you mapping the 8080 port from the container back to the host? My understanding of the EXPOSE instruction is that it does not actually publish the port.

Hi @JustXtreme,
i’ve compiled successfully a cesiumjs image simply
modifying the package json.
“start”: “node server.cjs --public”

It works like a charm.