Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Commit

Permalink
Merge pull request #849 from houz42/master
Browse files Browse the repository at this point in the history
use two-stage building for conductor:server
  • Loading branch information
cyzhao authored Dec 2, 2018
2 parents fc44576 + d931e8d commit f882d25
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 18 deletions.
20 changes: 17 additions & 3 deletions docker/server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
#
# conductor:server - Netflix conductor server
#

# 0. Builder stage
FROM openjdk:8-jdk AS builder

MAINTAINER Netflix OSS <[email protected]>

# Copy the project directly onto the image
COPY . /conductor
WORKDIR /conductor

# Build the server on run
RUN ./gradlew build -x test

# 1. Bin stage
FROM openjdk:8-jre-alpine

MAINTAINER Netflix OSS <[email protected]>
Expand All @@ -9,9 +23,9 @@ MAINTAINER Netflix OSS <[email protected]>
RUN mkdir -p /app/config /app/logs /app/libs

# Copy the project directly onto the image
COPY ./docker/server/bin /app
COPY ./docker/server/config /app/config
COPY ./server/build/libs/conductor-server-*-all.jar /app/libs
COPY --from=builder /conductor/docker/server/bin /app
COPY --from=builder /conductor/docker/server/config /app/config
COPY --from=builder /conductor/server/build/libs/conductor-server-*-all.jar /app/libs

# Copy the files for the server into the app folders
RUN chmod +x /app/startup.sh
Expand Down
13 changes: 0 additions & 13 deletions docker/server/Dockerfile.build

This file was deleted.

2 changes: 0 additions & 2 deletions docker/server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ This Dockerfile create the conductor:server image

Run the following commands from the project root.

`docker build -f docker/server/Dockerfile.build -t conductor:server-build .`
`docker run -v $(pwd):/conductor conductor:server-build`
`docker build -f docker/server/Dockerfile -t conductor:server .`

## Running the conductor server
Expand Down

0 comments on commit f882d25

Please sign in to comment.