Skip to content

Lightweight Docker image based on node 14 Alpine with yarn, openssh, git, bash and rsync

License

Notifications You must be signed in to change notification settings

COEXCZ/node-alpine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

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
yarn add firebase-tools --dev
  1. Make alias for firebase in your project

Add this line to your package.json into scripts object

scripts: {
  "firebase": "firebase"
}
  1. Get the $FIREBASE_TOKEN by running:
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
image: coexcz/node-alpine

pipelines:
  branches:
    master:
      - step:
          caches:
            - node
          script:
            - yarn
            - yarn build
            - 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

yarn release:patch
# yarn release:minor
# yarn release:major

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

Manually

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