Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update packages and base image #61

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions Dockerfile.alpine
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
# docker-logentries
#
# VERSION 1.0.0
#
# Make sure you don't have uncommitted local changes, then build it like this:
#
# $ TAG=795782686109.dkr.ecr.us-east-1.amazonaws.com/jobber/docker-logentries:alpine
# $ docker build -t $TAG --label COMMIT=$(git show-ref --verify HEAD | cut -d' ' -f1) -f Dockerfile.alpine .
#
# $ TAG=275552769658.dkr.ecr.us-east-1.amazonaws.com/jobber/docker-logentries:alpine
# $ docker build -t $TAG --label COMMIT=$(git show-ref --verify HEAD | cut -d' ' -f1) -f Dockerfile.alpine .
#
# Then push the images to our private repos in ECR.
#

FROM mhart/alpine-node:5.10.1
FROM mhart/alpine-node:15.6.0
MAINTAINER Rapid 7 - InsightOps <[email protected]>
RUN apk add --no-cache bash

WORKDIR /usr/src/app
COPY package.json package.json
RUN npm install --production
RUN npm cache clean
COPY package.json package-lock.json ./
RUN npm ci --production && npm cache clean --force
COPY index.js /usr/src/app/index.js

ENTRYPOINT ["/usr/src/app/index.js"]
Expand Down
6 changes: 5 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ function start(opts) {
if (token) {
this.push(token);
this.push(' ');
this.push(JSON.stringify(obj));
if (opts.json){
this.push(JSON.stringify(obj));
} else {
this.push(obj.line)
}
this.push('\n');
}

Expand Down
Loading