Skip to content

Commit

Permalink
fix: newline on docker templates
Browse files Browse the repository at this point in the history
  • Loading branch information
Pehesi97 committed Oct 23, 2023
1 parent 52a88b8 commit e94eb6d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion assets/docker/Dockerfile.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ RUN CGO_ENABLED=0 go build -o /go/bin/app
FROM gcr.io/distroless/static-debian11

COPY --from=build /go/bin/app /
ENTRYPOINT ["/app"]
ENTRYPOINT ["/app"]
2 changes: 1 addition & 1 deletion assets/docker/Dockerfile.node.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ FROM gcr.io/distroless/nodejs20-debian11
COPY --from=build-env /app /app
WORKDIR /app
USER nonroot
CMD ["index.js"]
CMD ["index.js"]
5 changes: 4 additions & 1 deletion src/cli/template_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ FROM gcr.io/distroless/static-debian11
COPY --from=build /go/bin/app /
ENTRYPOINT ["/app"]
`

const expectedNodeAppDockerTemplate = `FROM node:20.2.0 AS build-env
Expand All @@ -49,6 +50,7 @@ COPY --from=build-env /app /app
WORKDIR /app
USER nonroot
CMD ["index.js"]
`

const expectedFrontendJsAppDockerTemplate = `FROM node:20.2.0 AS build-env
Expand All @@ -57,7 +59,7 @@ WORKDIR /app
COPY package*.json tsconfig*.json ./
RUN i
RUN npm i
COPY . .
Expand All @@ -73,6 +75,7 @@ WORKDIR /app
USER nonroot
CMD npx http-server ./dist
`

var projects = map[project.ProjectType]map[string]string{
Expand Down

0 comments on commit e94eb6d

Please sign in to comment.