未验证 提交 66d31a1d 编写于 作者: J Jared Parsons 提交者: GitHub

Merge pull request #32885 from chsienki/dockerfile_fix

update mono-devel in dockerfile, and don't cache later commands
......@@ -234,15 +234,17 @@ function BuildSolution {
local test_runtime=""
local mono_tool=""
if [[ "$test_mono" == true ]]; then
mono_path="$scriptroot/invoke-mono.sh"
# Echo out the mono version to the comamnd line so it's visible in CI logs. It's not fixed
# as we're using a feed vs. a hard coded package.
if [[ "$ci" == true ]]; then
mono --version
chmod +x "$mono_path"
fi
test=true
test_runtime="/p:TestRuntime=Mono"
mono_path=`command -v mono`
mono_tool="/p:MonoTool=\"$mono_path\""
elif [[ "$test_core_clr" == true ]]; then
test=true
......
......@@ -40,6 +40,12 @@ RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E03280
apt-get install -y mono-devel && \
apt-get clean
# Update previously installed mono-devel.
# Cache bust ensures we'll always run the commands following regardless of docker cache status
ARG CACHE_BUST=0
RUN apt-get update && apt-get upgrade -y
# Setup User to match Host User, and give superuser permissions
ARG USER_ID=0
RUN useradd -m code_executor -u ${USER_ID} -g sudo
......
......@@ -22,7 +22,7 @@ docker kill $CONTAINER_NAME || true
# Build the docker container (will be fast if it is already built)
echo "Building Docker Container using Dockerfile: $dockerfile"
docker build --build-arg USER_ID=$(id -u) -t $CONTAINER_TAG $dockerfile
docker build --build-arg USER_ID=$(id -u) --build-arg CACHE_BUST=$(date +%s) --no-cache -t $CONTAINER_TAG $dockerfile
# Run the build in the container
echo "Launching build in Docker Container"
......
#!/usr/bin/env bash
#
# Copyright (c) .NET Foundation and contributors. All rights reserved.
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
#
# invoke mono with debug flags
mono --debug "$@"
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册