зеркало из https://github.com/microsoft/helium-ui.git
Dockerfile (#5)
* Added Dockerfile * Removed unnecessary line from Dockerfile * Readme updates * Fixing spacing in README
This commit is contained in:
Родитель
98904378bd
Коммит
3b82ab5086
|
@ -0,0 +1,7 @@
|
|||
FROM node:dubnium-alpine
|
||||
WORKDIR /app
|
||||
COPY . /app
|
||||
RUN npm install \
|
||||
&& npm run build
|
||||
EXPOSE 3000
|
||||
ENTRYPOINT ["npm", "start"]
|
31
README.md
31
README.md
|
@ -11,7 +11,9 @@ Helium UI is a React application built in TypeScript created to test and display
|
|||
- Formik - Handling state using React Forms and Dialogs
|
||||
|
||||
|
||||
## Getting Started
|
||||
# Getting Started
|
||||
|
||||
## Run Locally with npm
|
||||
|
||||
1. Clone the repository
|
||||
2. Open a terminal in the local respository directory
|
||||
|
@ -20,6 +22,33 @@ Helium UI is a React application built in TypeScript created to test and display
|
|||
npm build && npm start
|
||||
```
|
||||
|
||||
## Run Locally with Docker
|
||||
|
||||
1. Clone the repository
|
||||
2. Open a terminal in the local repository directory
|
||||
3. Build the application using
|
||||
```
|
||||
docker build -t helium-ui .
|
||||
```
|
||||
|
||||
4. Run the application using
|
||||
```
|
||||
docker run -it -P helium-ui
|
||||
```
|
||||
|
||||
In another terminal, run:
|
||||
```
|
||||
docker ps
|
||||
```
|
||||
|
||||
Output will show the port number the image is running on:
|
||||
```
|
||||
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS
|
||||
1dafc0296c23 helium-ui "npm start" 24 seconds ago Up 23 seconds 0.0.0.0:32770->3000/tcp
|
||||
```
|
||||
|
||||
5. In a browser, navigate to `http://localhost:<port number from previous step>` and the Helium UI should appear.
|
||||
|
||||
|
||||
## Contributing
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче