Skip to content

Commit

Permalink
Updating HelloWorld Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
TalZaccai committed Jan 16, 2019
1 parent a5e66d1 commit fa3f50e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
13 changes: 2 additions & 11 deletions InternalImmortals/PerformanceTestInterruptible/Dockerfile
Expand Up @@ -12,32 +12,23 @@ RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
# ----------------------------------------

# Publish to a local directory:
ENV CGDEPS=/ambrosia/InternalImmortals/PerformanceTestInterruptible/CodeGenDependencies/$AMBROSIA_DOTNET_FRAMEWORK

ENV PATH="${PATH}:/ambrosia/InternalImmortals/PerformanceTestInterruptible/Client/publish:/ambrosia/InternalImmortals/PerformanceTestInterruptible/Server/publish"

# ------------------------------------------------------------

# This Dockerfile is an example of adding the application
# *piece-by-piece* to enable incremental rebuilds.
ADD IJob /ambrosia/InternalImmortals/PerformanceTestInterruptible/IJob
WORKDIR /ambrosia/InternalImmortals/PerformanceTestInterruptible
RUN dotnet publish -o $CGDEPS $BLDFLAGS IJob/IJob.csproj

# DANGER, WARNING, FIXME: it is UNSAFE to dotnet publish twice to the same absolute path:
ADD API /ambrosia/InternalImmortals/PerformanceTestInterruptible/API
RUN dotnet publish -o $CGDEPS $BLDFLAGS API/ServerAPI.csproj

# Run the code-generation tool:
RUN rm -rf ./GeneratedSourceFiles && \
mkdir -p GeneratedSourceFiles
RUN AmbrosiaCS CodeGen -a IJob/bin/Release/netcoreapp2.0/linux-x64/IJob.dll -a API/bin/Release/netcoreapp2.0/linux-x64/ServerAPI.dll -o PTIAmbrosiaGeneratedAPINetCore -f netcoreapp2.0 -b ./CodeGenDependencies/netcoreapp2.0
RUN AmbrosiaCS CodeGen -a IJob/bin/Release/netcoreapp2.0/linux-x64/IJob.dll -a API/bin/Release/netcoreapp2.0/linux-x64/ServerAPI.dll -o PTIAmbrosiaGeneratedAPI -f netcoreapp2.0 -f net46

# Be wary: absolute paths have rather different behavior for dotnet publish.
ENV BUILDIT="dotnet publish -o publish $BLDFLAGS"

# Bulid/ppublish the RPC wrappers whose project we just created:
RUN $BUILDIT GeneratedSourceFiles/PTIAmbrosiaGeneratedAPINetCore/latest/PTIAmbrosiaGeneratedAPINetCore.csproj
RUN $BUILDIT GeneratedSourceFiles/PTIAmbrosiaGeneratedAPI/latest/PTIAmbrosiaGeneratedAPI.csproj

# publish the client/server executables that we'll actually run:
ADD Client /ambrosia/InternalImmortals/PerformanceTestInterruptible/Client
Expand Down
2 changes: 1 addition & 1 deletion Scripts/run_linux_ci.sh
Expand Up @@ -79,7 +79,7 @@ case $mode in
# Build Application 2: Hello World Sample
# ----------------------------------------
cd "$AMBROSIA_ROOT"/Samples/HelloWorld
echo "HelloWorld: First make sure a straight-to-the-solution build works:"
#echo "HelloWorld: First make sure a straight-to-the-solution build works:"
#dotnet publish -c $CONF -f $FMWK HelloWorld.sln
echo "HelloWorld: Then make sure it builds from scratch:"
rm -rf GeneratedSourceFiles
Expand Down

0 comments on commit fa3f50e

Please sign in to comment.