Giter Club home page Giter Club logo

docker-node-awscli's Introduction

sleavely/node-awscli

Lambda-compatible NodeJS images with AWS CLI installed.

Docker Hub | Github

Automatic Updates

Whenever a new NodeJS version is released, an instance of commit-on-release creates an empty commit in the corresponding branch (v16 and v18, v20) so that a new image is published to Docker Hub by a Github Action workflow.

Usage in CI/CD environments

Instead of using e.g. node:20 and installing awscli, jq, and zip every time the pipeline runs, just switch out the name of the image to sleavely/node-awscli:20.x or another appropriate version tag.

Bitbucket Pipelines

In bitbucket-pipelines.yml:

image: sleavely/node-awscli:20.x

pipelines:
  default:
    - step:
        name: Deploy to test environment
        script:
          - npm ci
          - npm run build-app-test
          - aws s3 sync ./build s3://$(WEBHOSTING_BUCKET_NAME)/

CircleCI

In .circleci/config.yml:

version: 2
jobs:
  deploy:
    docker:
      - image: sleavely/node-awscli:20.x
    steps:
    - checkout
    - run: npm ci
    - run: npm run build-app-test
    - run: aws s3 sync ./build s3://$(WEBHOSTING_BUCKET_NAME)/

Github Actions

In .github/worksflows/deploy.yml:

name: Build and deploy
on:
  push:
    branches:
      - main
jobs:
  deploy:
    runs-on: ubuntu-latest
    container:
      image: sleavely/node-awscli:20.x
    steps:
    - uses: actions/checkout@v3
    - run: npm ci
    - run: npm run build-app-test
    - run: aws s3 sync ./build s3://$(WEBHOSTING_BUCKET_NAME)/
      env:
        AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
        AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
        WEBHOSTING_BUCKET_NAME: my-awesome-bucket

docker-node-awscli's People

Contributors

jeffxor avatar jmbromley avatar sleavely avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

docker-node-awscli's Issues

Node version 21 Image

Hi Sleavely, could you create and publish a version of the docker image to docker hub using node version 21 please.

Update Docker version and include buildx

Can you please update the included docker version and install buildx into the image? I've been using this image to build other images in a CICD pipeline then upload them to an AWS image repo. It has been working great, but the new version of the Nx plugin I'm using requires buildx. There are options to make buildx the default builder, but you don't have to turn it on (for better backward compatibility), I can do so within the CICD container.

Buildx: https://github.com/docker/buildx
Nx Plugin: https://github.com/gperdomor/nx-tools (no actions, just for reference)

Update npm to have `npm ci`

The default 8.10 image ships with npm 5.6.0. npm ci wasn't introduced until 5.7.0. Add the following to the Dockerfile:

RUN npm update -g npm

At the time of writing, this should yield npm 5.10.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.