mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
feature(docker) add Dockerfile for arm based clients such as rpi (#268)
This commit is contained in:
parent
a4c8736663
commit
7fcc860bea
8 changed files with 157 additions and 38 deletions
25
docker/Dockerfile
Normal file
25
docker/Dockerfile
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
FROM node
|
||||
LABEL maintainer="Coderaiser"
|
||||
|
||||
RUN mkdir -p /usr/src/app
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
COPY package.json /usr/src/app/
|
||||
|
||||
RUN npm config set package-lock false && \
|
||||
npm install --production && \
|
||||
npm i gritty && \
|
||||
npm cache clean --force
|
||||
|
||||
COPY . /usr/src/app
|
||||
|
||||
WORKDIR /
|
||||
|
||||
ENV cloudcmd_terminal true
|
||||
ENV cloudcmd_terminal_path gritty
|
||||
ENV cloudcmd_open false
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
ENTRYPOINT ["/usr/src/app/bin/cloudcmd.js"]
|
||||
|
||||
29
docker/Dockerfile.alpine
Normal file
29
docker/Dockerfile.alpine
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
FROM node:alpine
|
||||
LABEL maintainer="Coderaiser"
|
||||
|
||||
RUN mkdir -p /usr/src/app
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
COPY package.json /usr/src/app/
|
||||
|
||||
RUN npm config set package-lock false && \
|
||||
npm install --production && \
|
||||
apk update && \
|
||||
apk add --no-cache bash make g++ python && \
|
||||
npm i gritty && \
|
||||
npm cache clean --force && \
|
||||
apk del make g++ python && \
|
||||
rm -rf /usr/include /tmp/* /var/cache/apk/*
|
||||
|
||||
COPY . /usr/src/app
|
||||
|
||||
WORKDIR /
|
||||
|
||||
ENV cloudcmd_terminal true
|
||||
ENV cloudcmd_terminal_path gritty
|
||||
ENV cloudcmd_open false
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
ENTRYPOINT ["/usr/src/app/bin/cloudcmd.js"]
|
||||
|
||||
31
docker/arm/Dockerfile.arm32v7
Normal file
31
docker/arm/Dockerfile.arm32v7
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
# Dockerfile to be used in an ARMv7 environment like Raspverry PI 4
|
||||
FROM arm32v7/node:slim
|
||||
LABEL maintainer="Coderaiser, tea-mo903"
|
||||
|
||||
RUN mkdir -p /usr/src/app
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
COPY package.json /usr/src/app/
|
||||
|
||||
RUN apt-get update && apt-get -y install python3 make g++
|
||||
|
||||
ENV PYTHON python3
|
||||
|
||||
RUN npm config set package-lock false && \
|
||||
npm install --production && \
|
||||
npm i gritty && \
|
||||
npm cache clean --force
|
||||
|
||||
RUN apt-get -y remove --purge python3 make g++
|
||||
|
||||
COPY . /usr/src/app
|
||||
|
||||
WORKDIR /
|
||||
|
||||
ENV cloudcmd_terminal true
|
||||
ENV cloudcmd_terminal_path gritty
|
||||
ENV cloudcmd_open false
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
ENTRYPOINT ["/usr/src/app/bin/cloudcmd.js"]
|
||||
31
docker/arm/Dockerfile.arm64v8
Normal file
31
docker/arm/Dockerfile.arm64v8
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
# Dockerfile to be used in an ARMv7 environment like Raspverry PI 4
|
||||
FROM arm64v8/node:slim
|
||||
LABEL maintainer="Coderaiser, tea-mo903"
|
||||
|
||||
RUN mkdir -p /usr/src/app
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
COPY package.json /usr/src/app/
|
||||
|
||||
RUN apt-get update && apt-get -y install python3 make g++
|
||||
|
||||
ENV PYTHON python3
|
||||
|
||||
RUN npm config set package-lock false && \
|
||||
npm install --production && \
|
||||
npm i gritty && \
|
||||
npm cache clean --force
|
||||
|
||||
RUN apt-get -y remove --purge python3 make g++
|
||||
|
||||
COPY . /usr/src/app
|
||||
|
||||
WORKDIR /
|
||||
|
||||
ENV cloudcmd_terminal true
|
||||
ENV cloudcmd_terminal_path gritty
|
||||
ENV cloudcmd_open false
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
ENTRYPOINT ["/usr/src/app/bin/cloudcmd.js"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue