- Create the GitHub PAT.
https://github.com/settings/tokens$ delete:packages, repo, write:packages
- Create
key.txt
file and copy you PAT in this file.$ vim key.txt
- Login GitHub docker.
$ docker login https://docker.pkg.github.com --username bell-rabbit --password-stdin < key.txt
- Get the GitHub docker image.
$ docker pull docker.pkg.github.com/bell-rabbit/my-test-nodejs-docker-qnap/my-test-nodejs-docker-qnap:v1.0.0.0
- Build Docker
$ docker build -t my-test-nodejs-docker-qnap-arm-v7 --no-cache --platform linux/arm/v7 .
- Add a Tag
$ docker tag my-test-nodejs-docker-qnap-arm-v7 docker.pkg.github.com/bell-rabbit/my-test-nodejs-docker-qnap/my-test-nodejs-docker-qnap-linux-arm-v7:latest
- Push Docker image to GitHub
$ docker push docker.pkg.github.com/bell-rabbit/my-test-nodejs-docker-qnap/my-test-nodejs-docker-qnap-linux-arm-v7:latest
- Login Qnap by SSH
- Get your Image in GitHub
- Create your Container in QNAP Container Station UI.
- Get your Image in GitHub
- list docker image
$ sudo docker image ls
- Run Image
$ sudo docker run --name my-docker-qnap -d -p 80:8080 -v ~/docker/my-test-nodejs-docker-qnap:/usr/src/app/uploads -it docker.pkg.github.com/bell-rabbit/my-test-nodejs-docker-qnap/my-test-nodejs-docker-qnap:latest
- list all container (IF)
$ sudo docker ps -a
- delete container (IF)
$ sudo docker container rm <your_container_id>
- Create the
multipart/form-data
POST Request - POST to http://<your_ip>:<your_port>/uploadTest
- Open your upload image in http://<your_ip>:<your_port>/img/<response_file_name>