forked from openstf/stf
-
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
1 changed file
with
33 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
FROM openstf/armv7hf-base:v1.0.1 | ||
|
||
# Add a user for the app. | ||
RUN useradd --system \ | ||
--no-create-home \ | ||
--shell /usr/sbin/nologin \ | ||
--home-dir /app \ | ||
stf | ||
|
||
# Sneak the stf executable into $PATH. | ||
ENV PATH /app/bin:$PATH | ||
|
||
# Work in app dir by default. | ||
WORKDIR /app | ||
|
||
# Export default app port, not enough for all processes but it should do | ||
# for now. | ||
EXPOSE 3000 | ||
|
||
# Copy app source. | ||
COPY . /app/ | ||
|
||
# Get the rest of the dependencies and build. | ||
RUN export PATH=/app/node_modules/.bin:$PATH && \ | ||
npm install && \ | ||
bower install --allow-root && \ | ||
gulp build | ||
|
||
# Switch to weak user. | ||
USER stf | ||
|
||
# Show help by default. | ||
CMD stf --help |