项目作者: COEXCZ

项目描述 :
Lightweight Docker image based on node 14 Alpine with yarn, openssh, git, bash and rsync
高级语言: Dockerfile
项目地址: git://github.com/COEXCZ/node-alpine.git
创建时间: 2019-11-21T14:15:45Z
项目社区:https://github.com/COEXCZ/node-alpine

开源协议:MIT License

下载


Node Alpine Docker Image with basic useful tools

Lightweight Docker image based on node:16-alpine with basic useful tools:

  • node 16.14.0+
  • yarn 1.22.17+
  • npm 8.3.1+
  • git 2.34.1+
  • bash 5.1.16+
  • openssh 8.8+
  • rsync 3.2.3+
  • curl 7.80.0+

Docker hub

Can be pulled from Docker Hub: coexcz/node-alpine

  1. docker pull coexcz/node-alpine

Examples

Bitbucket Pipelines CI + Angular

Deploy your Angular project with Bitbucket Pipelines to Firebase Hosting

  1. Install firebase-tools locally in your project
  1. yarn add firebase-tools --dev
  1. Make alias for firebase in your project

Add this line to your package.json into scripts object

  1. scripts: {
  2. "firebase": "firebase"
  3. }
  1. Get the $FIREBASE_TOKEN by running:
  1. yarn firebase login:ci
  1. Set Bitbucket environment variable
  • Save CI token to Bitbucket’s environment variables (Project -> Settings > Environment variables) with variable name FIREBASE_TOKEN
  1. Create Firebase project and make firebase config file
  • Create Firebase project
  • Run yarn firebase init in your project
  • Go through the wizard (it should create firebase.json and dist folder)

Pipelines configuration

  • Create bitbucket-pipelines.yml
  1. image: coexcz/node-alpine
  2. pipelines:
  3. branches:
  4. master:
  5. - step:
  6. caches:
  7. - node
  8. script:
  9. - yarn
  10. - yarn build
  11. - yarn firebase deploy --token "$FIREBASE_TOKEN"

Conclusion

And now every commit pushed to master branch will be deployed to your firebase hosting 🎉

Development

Release

Automatically

  1. yarn release:patch
  2. # yarn release:minor
  3. # yarn release:major

New version will be built, tagged and pushed into Docker Hub with current tag :v1.x.x + :latest tag

Manually

  1. docker build --no-cache --progress plain --pull -t node-alpine:v16.x.x .
  2. docker tag node-alpine:v16.x.x coexcz/node-alpine:v16.x.x
  3. docker push coexcz/node-alpine:v16.x.x