├── .dockerignore ├── CHANGELOG.md ├── Dockerfile ├── .gitignore ├── README.md ├── LICENSE.md └── .github └── workflows ├── build-docker-images.yml └── build-and-push-docker-images.yml /.dockerignore: -------------------------------------------------------------------------------- 1 | # Git repository meta information 2 | **/.git 3 | **/.github 4 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Docker Yeoman 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## 1.0.0 - 2021-11.03 6 | ### Added 7 | * Initial release 8 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | ARG TAG=14-alpine 2 | 3 | FROM node:$TAG 4 | 5 | WORKDIR /app 6 | 7 | # Install packages 8 | RUN set -eux; \ 9 | npm install -g yo \ 10 | && \ 11 | # Fix permissions, ref: https://github.com/keystonejs/keystone-classic/issues/1566 12 | mkdir -p /root/.config/configstore \ 13 | && \ 14 | mkdir -p /root/.config/insight-nodejs \ 15 | && \ 16 | chmod -R g+rwx /root /root/.config 17 | 18 | CMD ["yo"] 19 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # VITEJS 2 | vite 3 | 4 | # BUILD FILES 5 | node_modules/ 6 | yarn-error.log 7 | npm-debug.log 8 | .pnpm-store 9 | 10 | # MISC FILES 11 | .cache 12 | .DS_Store 13 | .idea 14 | .project 15 | .settings 16 | *.esproj 17 | *.sublime-workspace 18 | *.sublime-project 19 | *.tmproj 20 | *.tmproject 21 | .vscode/* 22 | !.vscode/settings.json 23 | !.vscode/tasks.json 24 | !.vscode/launch.json 25 | !.vscode/extensions.json 26 | config.codekit3 27 | prepros-6.config 28 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Docker Yeoman 2 | 3 | Docker images for node yeoman 4 | 5 | ## About Docker Yeoman 6 | 7 | This repo contains a Dockerfile that is used to build & push Docker images to [Docker Hub](https://hub.docker.com/repository/docker/nystudio107/node-yeoman) that contain the Yeoman command `yo`, so you can run it via Docker with whatever version of Node.js you require. 8 | 9 | The images are built "in the cloud" via GitHub actions: 10 | 11 | - When any changes are pushed to the `develop` branch, the images are rebuilt to ensure they build properly 12 | - When a new tagged release is pushed, the images are built, tagged, and pushed to Docker Hub 13 | 14 | Images are built for Node.js versions 12, 14 & 16, for both AMD (Intel) and ARM (Apple Silicon) architectures. 15 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 nystudio107 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /.github/workflows/build-docker-images.yml: -------------------------------------------------------------------------------- 1 | name: Build Docker Images 2 | on: 3 | push: 4 | branches: 5 | - develop 6 | workflow_dispatch: 7 | jobs: 8 | build-node: 9 | runs-on: ubuntu-latest 10 | strategy: 11 | matrix: 12 | node: ["12", "14", "16"] 13 | name: node-yeoman ${{ matrix.node }} images 14 | steps: 15 | - name: Set version tag 16 | run: | 17 | echo "TAGS=nystudio107/node-yeoman:${{ matrix.node }}-alpine" >> $GITHUB_ENV 18 | - name: Set latest tag 19 | if: matrix.node == 16 20 | run: | 21 | echo "TAGS=$TAGS,nystudio107/node-yeoman:latest" >> $GITHUB_ENV 22 | - name: Check out the repository 23 | uses: actions/checkout@v2 24 | - name: Set up QEMU 25 | uses: docker/setup-qemu-action@v1 26 | - name: Set up Docker Buildx 27 | uses: docker/setup-buildx-action@v1 28 | with: 29 | install: true 30 | - name: Login to Docker Hub 31 | uses: docker/login-action@v1 32 | with: 33 | username: ${{ secrets.DOCKERHUB_USERNAME }} 34 | password: ${{ secrets.DOCKERHUB_TOKEN }} 35 | - name: Build nystudio107/node-yeoman:${{ matrix.node }}-alpine 36 | uses: docker/build-push-action@v2 37 | with: 38 | context: ./ 39 | file: ./Dockerfile 40 | push: false 41 | platforms: linux/amd64,linux/arm64 42 | tags: ${{ env.TAGS }} 43 | build-args: | 44 | TAG=${{ matrix.node }}-alpine 45 | -------------------------------------------------------------------------------- /.github/workflows/build-and-push-docker-images.yml: -------------------------------------------------------------------------------- 1 | name: Build and Push Docker Images 2 | on: 3 | push: 4 | tags: 5 | - '*.*.*' 6 | workflow_dispatch: 7 | jobs: 8 | build-node: 9 | runs-on: ubuntu-latest 10 | strategy: 11 | matrix: 12 | node: ["12", "14", "16"] 13 | name: node-yeoman ${{ matrix.node }} images 14 | steps: 15 | - name: Set version tag 16 | run: | 17 | echo "TAGS=nystudio107/node-yeoman:${{ matrix.node }}-alpine" >> $GITHUB_ENV 18 | - name: Set latest tag 19 | if: matrix.node == 16 20 | run: | 21 | echo "TAGS=$TAGS,nystudio107/node-yeoman:latest" >> $GITHUB_ENV 22 | - name: Check out the repository 23 | uses: actions/checkout@v2 24 | - name: Set up QEMU 25 | uses: docker/setup-qemu-action@v1 26 | - name: Set up Docker Buildx 27 | uses: docker/setup-buildx-action@v1 28 | with: 29 | install: true 30 | - name: Login to Docker Hub 31 | uses: docker/login-action@v1 32 | with: 33 | username: ${{ secrets.DOCKERHUB_USERNAME }} 34 | password: ${{ secrets.DOCKERHUB_TOKEN }} 35 | - name: Build nystudio107/node-yeoman:${{ matrix.node }}-alpine 36 | uses: docker/build-push-action@v2 37 | with: 38 | context: ./ 39 | file: ./Dockerfile 40 | push: true 41 | platforms: linux/amd64,linux/arm64 42 | tags: ${{ env.TAGS }} 43 | build-args: | 44 | TAG=${{ matrix.node }}-alpine 45 | --------------------------------------------------------------------------------