Skip to content
This repository was archived by the owner on Dec 18, 2018. It is now read-only.

Commit 9e2947f

Browse files
committed
Update SystemdActivation docker test to use the latest runtime
1 parent 317d719 commit 9e2947f

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ before_install:
3232
- if test "$TRAVIS_OS_NAME" == "osx"; then brew update; brew install openssl; ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/; ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/; fi
3333
script:
3434
- ./build.sh --quiet verify
35-
- if test '$TRAVIS_OS_NAME' != 'osx'; then bash test/Microsoft.AspNetCore.Server.Kestrel.FunctionalTests/SystemdActivation/docker.sh; fi
35+
- if test "$TRAVIS_OS_NAME" != "osx"; then bash test/Microsoft.AspNetCore.Server.Kestrel.FunctionalTests/SystemdActivation/docker.sh; fi

test/Microsoft.AspNetCore.Server.Kestrel.FunctionalTests/SystemdActivation/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM microsoft/aspnetcore
1+
FROM microsoft/dotnet:1.1-runtime-deps
22

33
# The "container" environment variable is read by systemd.
44
ENV container=docker
@@ -8,6 +8,7 @@ VOLUME ["/sys/fs/cgroup"]
88

99
# Create activate-kestrel.service to launch the "publish" app on new requests to 8080.
1010
EXPOSE 8080
11+
ADD .dotnet/ /usr/share/dotnet/
1112
ADD publish/ /publish/
1213
ADD activate-kestrel.socket /etc/systemd/system/activate-kestrel.socket
1314
ADD activate-kestrel.service /etc/systemd/system/activate-kestrel.service
@@ -20,7 +21,8 @@ RUN ["cp", "/lib/systemd/system/dbus.service", "/etc/systemd/system/"]
2021
RUN ["sed", "-i", "s/OOMScoreAdjust=-900//", "/etc/systemd/system/dbus.service"]
2122

2223
# Automatically start activate-kestrel.service on boot.
23-
RUN ["ln", "-sf", "/usr/lib/systemd/system/activate-kestrel.service", "/etc/systemd/system/multi-user.target.wants/activate-kestrel.service"]
24+
RUN ["ln", "-s", "/usr/share/dotnet/dotnet", "/usr/bin/dotnet"]
25+
RUN ["ln", "-s", "/usr/lib/systemd/system/activate-kestrel.service", "/etc/systemd/system/multi-user.target.wants/activate-kestrel.service"]
2426

2527
# Launch systemd.
2628
CMD ["/sbin/init"]

test/Microsoft.AspNetCore.Server.Kestrel.FunctionalTests/SystemdActivation/docker.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ source ./.build/KoreBuild.sh -r $repoDir --quiet
88
dotnet restore
99
dotnet publish ./samples/SampleApp/
1010
cp -R ./samples/SampleApp/bin/Debug/netcoreapp1.1/publish/ $scriptDir
11+
cp -R ~/.dotnet/ $scriptDir
1112

1213
image=$(docker build -qf $scriptDir/Dockerfile $scriptDir)
1314
container=$(docker run -Ptd --privileged $image)

0 commit comments

Comments
 (0)