forked from IBMCloudDevOps/watson-conversation-simple-kube
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from mdelder/mdelder-update-for-icp
Rebase Dockerfile on alpine & clean up entrypoint script
- Loading branch information
Showing
3 changed files
with
25 additions
and
18 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 |
---|---|---|
@@ -1,18 +1,25 @@ | ||
FROM node | ||
FROM node:boron-alpine | ||
EXPOSE 3000 | ||
|
||
RUN apt-get update && \ | ||
apt-get -y install jq && \ | ||
apt-get clean | ||
RUN apk --update --no-cache add jq curl tar | ||
|
||
LABEL org.label-schema.vendor="IBM" \ | ||
org.label-schema.name="$IMAGE_NAME" \ | ||
org.label-schema.description="$IMAGE_DESCRIPTION" \ | ||
org.label-schema.vcs-ref=$VCS_REF \ | ||
org.label-schema.vcs-url=$VCS_URL \ | ||
org.label-schema.license="Licensed Materials - Property of IBM" \ | ||
org.label-schema.schema-version="1.0" | ||
|
||
RUN mkdir -p /usr/src/app | ||
WORKDIR /usr/src/app | ||
|
||
RUN curl -L https://github.com/watson-developer-cloud/conversation-simple/archive/master.tar.gz --output /tmp/master.tar.gz && \ | ||
tar -xzvf /tmp/master.tar.gz -C /usr/src/app --strip-components 1 | ||
|
||
RUN npm install --production && npm cache clean | ||
RUN npm install --production | ||
|
||
COPY *.sh /usr/src/app | ||
COPY entrypoint.sh /usr/src/app | ||
RUN chmod +x /usr/src/app/entrypoint.sh | ||
|
||
CMD [ "/usr/src/app/run-server.sh"] | ||
CMD [ "/usr/src/app/entrypoint.sh"] |
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,6 +1,6 @@ | ||
#!/bin/bash | ||
#!/bin/sh | ||
|
||
export CONVERSATION_PASSWORD=$(echo "$CONVERSATION_SERVICE_CAR" | jq -r '.password') | ||
export CONVERSATION_USERNAME=$(echo "$CONVERSATION_SERVICE_CAR" | jq -r '.username') | ||
echo "CONVERSATION_USERNAME == $CONVERSATION_USERNAME" | ||
echo "CONVERSATION_PASSWORD == $CONVERSATION_PASSWORD" | ||
npm start | ||
echo "npm start" | ||
/usr/local/bin/npm start |
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