I am trying to make nmcli run inside the app container, so I can change some network settings.
# base-image for node on any machine using a template variable,
# see more about dockerfile templates here: http://docs.resin.io/deployment/docker-templates/
# and about resin base images here: http://docs.resin.io/runtime/resin-base-images/
# Note the node:slim image doesn't have node-gyp
FROM resin/%%RESIN_MACHINE_NAME%%-node:6-slim
# Enable systemd init system in container
ENV INITSYSTEM on
# use apt-get if you need to install dependencies,
# for instance if you need ALSA sound utils, just uncomment the lines below.
#RUN apt-get update && apt-get install -yq \
# alsa-utils libasound2-dev && \
# apt-get clean && rm -rf /var/lib/apt/lists/*
#RUN apt-get update && apt-get install network-manager
RUN apt-get update && apt-get install network-manager && \
apt-get clean && \
systemctl mask NetworkManager.service
WORKDIR /usr/src/app
COPY . .
RUN ["chmod","+x","nmcli"]
#CMD ./nmcli
# Defines our working directory in container
#WORKDIR /usr/src/app
# Copies the package.json first for better cache on later pushes
COPY package.json package.json
# This install npm dependencies on the resin.io build server,
# making sure to clean up the artifacts it creates in order to reduce the image size.
RUN JOBS=MAX npm install --production --unsafe-perm && npm cache clean && rm -rf /tmp/*
# This will copy all files in our root to the working directory in the container
COPY . ./
# server.js will run when container starts up on the device
CMD ["npm", "start"]
CMD ./nmcli
#CMD ["nmcli","--nocheck", "connection","up","resin-wifi-02"]
I try to set RUN chmod +x nmcli, but it still gives me the error: