Skip to content

Commit

Permalink
update dockerfile (#257)
Browse files Browse the repository at this point in the history
* update dockerfile

* typo in comment
  • Loading branch information
dragazo authored Sep 28, 2024
1 parent 1a0e267 commit 6977274
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 32 deletions.
30 changes: 6 additions & 24 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,31 +1,13 @@
FROM node:18-bookworm
MAINTAINER Brian Broll <[email protected]>

ADD . /netsblox
# Install updated C++ std lib plus a few things required for NodeHun, canvas/chart, docs building, etc.
RUN echo "deb http://deb.debian.org/debian testing main" >> /etc/apt/sources.list && apt-get update
RUN apt-get install -y build-essential libstdc++-11-dev gnuplot libcairo2-dev libpango1.0-dev libsdl-pango-dev libjpeg-dev libgif-dev librsvg2-dev python3-sphinx python3-sphinx-rtd-theme

# Configure apt-get for C++ std lib installation (later)
RUN echo "deb http://deb.debian.org/debian testing main" >> /etc/apt/sources.list && \
apt-get update

# # Fix broken perl setup as described here: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=993755
# RUN cd /tmp && \
# apt-get -y download libcrypt1 && \
# dpkg-deb -x $(ls | grep libcrypt) . && \
# cp -av lib/x86_64-linux-gnu/* /usr/lib/x86_64-linux-gnu/

# Install updated C++ std lib (required for NodeHun)
RUN apt-get install -y libstdc++-11-dev gnuplot \
libsdl-pango-dev libgif-dev # Required for canvas (chart service)
RUN ls /usr/include/cairo

WORKDIR /netsblox

# Clean up and install NetsBlox dependencies
RUN apt-get clean && \
rm -rf /tmp/* && \
cd /netsblox && npm install # Install netsblox dependencies

# Build the service docs for the publicly deployed services
RUN apt-get install -y python3-sphinx python3-sphinx-rtd-theme
# node utils/build-docs.js
ADD . .
RUN apt-get clean && rm -rf /tmp/* && npm install

CMD ["npm", "start"]
15 changes: 8 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"bad-words": "^3.0.4",
"cache-manager": "^2.0.0",
"cache-manager-fs": "^1.0.7",
"canvas": "^2.11.2",
"chalk": "^2.4.2",
"color-hash": "^1.0.3",
"command-exists": "^1.2.8",
Expand Down
2 changes: 1 addition & 1 deletion src/procedures/roboscape/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ const routes = [
customMiddleware: [isRobotOwner],
Handler: function (req) {
const { _id } = req.params;
// NOTE if using robotId => lowecase
// NOTE if using robotId => lowercase
return RoboscapeCol.findById(_id);
},
},
Expand Down

0 comments on commit 6977274

Please sign in to comment.