Skip to content

Commit

Permalink
chore: load_image (#893)
Browse files Browse the repository at this point in the history
## Description

Was not able to load image that contains the `dist` folder to push to
npmjs

```bash
WARNING: No output specified with docker-container driver. Build result will only remain in the build cache. To push result image into registry use --push or to load image into docker use --load
Unable to find image 'pepr-npm:latest' locally
Error response from daemon: pull access denied for pepr-npm, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
must specify at least one container source
npm warn package-json pepr@0.32.1 No bin file found at dist/cli.js
npm warn package-json pepr@0.32.1 No bin file found at dist/cli.js
npm warn package-json pepr@0.32.1 No bin file found at dist/cli.js
npm warn publish npm auto-corrected some errors in your package.json when publishing.  Please run "npm pkg fix" to address these errors.
npm warn publish errors corrected:
npm warn publish "bin" was converted to an object
npm warn publish "repository" was changed from a string to an object
npm warn publish "repository.url" was normalized to "git+https://github.com/defenseunicorns/pepr.git"
npm warn package-json pepr@0.32.1 No bin file found at dist/cli.js
```

## Related Issue

Fixes #
<!-- or -->
Relates to #

## Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [x] Other (security config, docs update, etc)

## Checklist before merging

- [x] Test, docs, adr added or updated as needed
- [x] [Contributor Guide
Steps](https://docs.pepr.dev/main/contribute/#submitting-a-pull-request)
followed

---------

Signed-off-by: Case Wylie <cmwylie19@defenseunicorns.com>
  • Loading branch information
cmwylie19 authored Jun 13, 2024
1 parent 8fef88d commit c88df4f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ jobs:
docker buildx build --push --platform linux/arm64/v8,linux/amd64 --tag ghcr.io/defenseunicorns/pepr/controller:${{ github.ref_name }} .
# Build Pepr dist folder for NPM
docker buildx build --tag pepr-npm . -f Dockerfile.dist
docker cp $(docker create --name kim pepr-npm):/app/dist ./dist && docker rm kim
docker buildx build --output="." --target=dist --no-cache . -f Dockerfile.dist
npm publish --provenance --access public
5 changes: 5 additions & 0 deletions Dockerfile.dist
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,8 @@ COPY --chown=node:node . .
RUN npm ci

RUN npm run build


FROM scratch AS dist

COPY --from=build /app/dist ./dist/

0 comments on commit c88df4f

Please sign in to comment.