-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
63 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,22 @@ | ||
# node-distroless | ||
|
||
This image combines the compactness and security of distroless with the convenience of dumb-init for process management, making Node.js applications run more stably in a container environment. | ||
This docker image can be used for single page apps. It serves your index.html if no other file matches. | ||
|
||
> This image is maintained with node latest LTS version | ||
> This image is maintained with node latest stable nginx version | ||
## Usage | ||
|
||
The simple usage example | ||
|
||
```dockerfile | ||
FROM ghcr.io/ebizbase/node-distroless | ||
WORKDIR /usr/src/app | ||
COPY . . | ||
CMD [ "index.js" ] | ||
FROM ghcr.io/ebizbase/nginx-spa | ||
WORKDIR /app | ||
COPY dist/ . | ||
``` | ||
|
||
Simply run your container as follows: | ||
|
||
```shell | ||
docker build -t your-app . | ||
docker run -p 8000:80 your-app | ||
``` | ||
|
||
Now you can visit http://localhost:8000/ in your browser or run curl -v http://localhost:8000/ to check if it's working. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters