mirror of
/repos/rpi-node.git
synced 2025-12-30 08:01:30 +01:00
initial commit Node.js v0.10.36
This commit is contained in:
parent
88a2b4ede3
commit
5b4ce02c35
18
Dockerfile
Normal file
18
Dockerfile
Normal file
@ -0,0 +1,18 @@
|
||||
|
||||
# Pull base image
|
||||
FROM resin/rpi-raspbian:wheezy
|
||||
MAINTAINER Dieter Reuter <dieter@hypriot.com>
|
||||
|
||||
# Install Node.js (from tarball)
|
||||
ENV NODE_VERSION 0.10.36
|
||||
ADD http://assets.hypriot.com/node-v${NODE_VERSION}-linux-armv6hf.tar.gz /
|
||||
RUN \
|
||||
cd /usr/local/ && \
|
||||
tar --strip-components 1 -xzf /node-v${NODE_VERSION}-linux-armv6hf.tar.gz && \
|
||||
rm -f node-v${NODE_VERSION}-linux-armv6hf.tar.gz
|
||||
|
||||
# Define working directory
|
||||
WORKDIR /data
|
||||
|
||||
# Define default command
|
||||
CMD ["bash"]
|
||||
22
Makefile
Normal file
22
Makefile
Normal file
@ -0,0 +1,22 @@
|
||||
.PHONY: all build push test version
|
||||
|
||||
DOCKER_IMAGE_VERSION=0.10.36
|
||||
DOCKER_IMAGE_NAME=hypriot/rpi-node
|
||||
DOCKER_IMAGE_TAGNAME=$(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_VERSION)
|
||||
|
||||
all: build
|
||||
|
||||
build:
|
||||
docker build -t $(DOCKER_IMAGE_TAGNAME) .
|
||||
docker tag -f $(DOCKER_IMAGE_TAGNAME) $(DOCKER_IMAGE_NAME):latest
|
||||
|
||||
push:
|
||||
docker push $(DOCKER_IMAGE_NAME)
|
||||
|
||||
test:
|
||||
docker run --rm $(DOCKER_IMAGE_TAGNAME) /bin/echo "Success."
|
||||
|
||||
version:
|
||||
docker run --rm $(DOCKER_IMAGE_TAGNAME) node --version
|
||||
docker run --rm $(DOCKER_IMAGE_TAGNAME) npm --version
|
||||
|
||||
19
README.md
Normal file
19
README.md
Normal file
@ -0,0 +1,19 @@
|
||||
# rpi-node
|
||||
Docker Image packaging for Node.js, used for Raspberry Pi
|
||||
|
||||
### build the Docker Image
|
||||
```bash
|
||||
make build
|
||||
```
|
||||
|
||||
### run the Docker Image and get version of installed Node.js
|
||||
```bash
|
||||
make version
|
||||
```
|
||||
|
||||
### push Docker Image to Docker Hub
|
||||
* First, use a `docker login` with username, password and email address
|
||||
* Second, push Docker Image to the official Docker Hub
|
||||
```bash
|
||||
make push
|
||||
```
|
||||
Loading…
x
Reference in New Issue
Block a user