Base image for TypeScript applications
1.0K
A base image for TypeScript development.
docker pull mrnehu/base-typescript
The image comes in two flavors:
dev-latest tag defines a just-in-time compilation container, which supports the development workflow by allowing in-place development.prod-latest tag defines an ahead-of-time compilation container, suitable for packaging and distributing an application.latest tag points to prod-latest.dev-latest - in-container developmentThe dev-latest tag defines a just-in-time compilation container, which supports the development workflow by allowing in-place development.
This workflow requires mounting your project directory to /opt/app. See docker-compose.dev.yml for an example.
The container assumes the existence of a package.json file with a correct main attribute, and a respective tsconfig.json file. No particular scripts or dependencies are required.
When starting the container, it will concurrently run tsc -w and nodemon to watch for file changes, automatically recompile and restart the application.
prod-latest - AoT compilationThe latest tag defines an ahead-of-time compilation container: the application will be built together with the image.
This workflow requires rebuilding the image each time the source code is modified, but does not require distributing code separately.
The container assumes the existence of a package.json file with the build and start scripts. No particular dependencies are required.
Create your own Dockerfile in your project directory as follows:
FROM mrnehu/base-typescript:prod-latest
COPY . .
RUN yarn install && yarn run build
Then, build your container directly or using docker-compose.
Content type
Image
Digest
Size
39.1 MB
Last updated
about 6 years ago
docker pull mrnehu/base-typescript