mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-21 17:12:43 +00:00
build: expose port in app-only dockerfile
This commit is contained in:
20
Dockerfile.Executable
Normal file
20
Dockerfile.Executable
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# Creates a docker image with only the app as an executable unit
|
||||||
|
# Dependencies need to be installed beforehand
|
||||||
|
# Needs to be build beforehand
|
||||||
|
# docker build -t registry.gitlab.com/openstapps/app/executable:core-x.y -f Dockerfile.Executable .
|
||||||
|
FROM node:10-alpine
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
COPY . /app
|
||||||
|
|
||||||
|
# To use ng directly
|
||||||
|
ENV PATH /app/node_modules/.bin:$PATH
|
||||||
|
|
||||||
|
EXPOSE 8100
|
||||||
|
|
||||||
|
# Because the dependencies were installed from the builder-Image,
|
||||||
|
# or locally, we need to rebuild node-sass library
|
||||||
|
RUN npm rebuild node-sass
|
||||||
|
|
||||||
|
# Starts the app
|
||||||
|
CMD ng run app:serve --host=0.0.0.0 --port=8100
|
||||||
Reference in New Issue
Block a user