zoukankan      html  css  js  c++  java
  • asp.net dockerfile

    mydocker/apline:20210517s6
    
    FROM alpine:3.13
    
    ENV S6_REL=2.2.0.3 S6_ARCH=amd64 TZ=Asia/Shanghai
    ENV DOTNET_VER=5.0.6 DOTNET_ARCH=x64
    
    LABEL base.maintainer=Roxedus
    LABEL base.s6.rel=${S6_REL} base.s6.arch=${S6_ARCH}
    LABEL dotnet_version=${DOTNET_VER} dotnet_arch=${DOTNET_ARCH}
    
    RUN 
    	set -eux && 
    	sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories && 
    	apk add --no-cache 
    		curl 
    		tar 
    		bash 
    		ca-certificates 
    		coreutils 
    		shadow 
    		tzdata 
    		libstdc++ 
    		libgcc 
    		icu-libs 
    		libintl 
    		libcap 
    		libssl1.1 
    		zlib 
    		krb5-libs 
    		&& 
    	apk add --no-cache libgdiplus --repository https://mirrors.ustc.edu.cn/alpine/edge/testing/ && 
    	curl -L -s https://github.com/just-containers/s6-overlay/releases/download/v${S6_REL}/s6-overlay-${S6_ARCH}.tar.gz | tar xzf - -C / &&  
    	groupmod -g 1000 users && 
    	useradd -u 1000 -U -d /config -s /bin/false rox && 
    	usermod -G users rox && 
    	mkdir -p 
    		/app 
    		/config && 
    	rm -rf /tmp/* && 
    	mkdir -p /etc/cont-init.d && 
    	echo IyEvdXNyL2Jpbi93aXRoLWNvbnRlbnYgYmFzaAoKUFVJRD0ke1BVSUQ6LTEwMDB9ClBHSUQ9JHtQR0lEOi0xMDAwfQoKZ3JvdXBtb2QgLW8gLWcgIiRQR0lEIiByb3gKdXNlcm1vZCAtbyAtdSAiJFBVSUQiIHJveAoKZWNobyAiClVzZXIgdWlkOiAgICAkKGlkIC11IHJveCkKVXNlciBnaWQ6ICAgICQoaWQgLWcgcm94KQotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCiIKCmNob3duIC1SIHJveDpyb3ggL2FwcApjaG93biAtUiByb3g6cm94IC9jb25maWc= | base64 -d >/etc/cont-init.d/1-prep-env
    
    RUN 
      mkdir -p /usr/share/dotnet 
      && curl -L -s https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/${DOTNET_VER}/aspnetcore-runtime-${DOTNET_VER}-linux-musl-${DOTNET_ARCH}.tar.gz | tar xzf - -C /usr/share/dotnet 
      && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet 
      && setcap CAP_NET_BIND_SERVICE=+eip /usr/share/dotnet/dotnet 
      && mkdir -p /etc/services.d/
    	
    VOLUME [ "/config" ]
    
    WORKDIR /app
    
    ENTRYPOINT ["/init"]
    
    mydocker/aspnetcore:apline5.0.6
    
    FROM mydocker/apline:20210517s6
    
    ENV DOTNET_VER=5.0.6 DOTNET_ARCH=x64
    
    LABEL maintainer=Roxedus
    LABEL dotnet_version=${DOTNET_VER} dotnet_arch=${DOTNET_ARCH}
    
    RUN 
      mkdir -p /usr/share/dotnet 
      && curl -L -s https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/${DOTNET_VER}/aspnetcore-runtime-${DOTNET_VER}-linux-musl-${DOTNET_ARCH}.tar.gz | tar xzf - -C /usr/share/dotnet 
      && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet 
      && setcap CAP_NET_BIND_SERVICE=+eip /usr/share/dotnet/dotnet 
      && mkdir -p /etc/services.d/
    
    WORKDIR /app
    
    mydocker/app1
    
    FROM mydocker/aspnetcore:apline5.0.6 
    
    ENV DOTNET_DLL=ttt.dll DOTNET_ARG=
    
    RUN mkdir -p /etc/services.d/app1 && 
    echo IyEvdXNyL2Jpbi93aXRoLWNvbnRlbnYgYmFzaApjZCAvYXBwIHx8IGV4aXQKCmV4ZWMgXAoJczYtc2V0dWlkZ2lkIHJveCBkb3RuZXQgYXJnMSBhcmcy | base64 -d >/etc/services.d/app1/run && 
    sed -i 's/arg1/'"${DOTNET_DLL}"'/g' /etc/services.d/app1/run && 
    sed -i 's/arg2/'"${DOTNET_ARG}"'/g' /etc/services.d/app1/run
    
    COPY publish/ /app/
    
    EXPOSE 5000 
    
    mydocker/aspnetcore:mix5.0.6
    
    FROM alpine:3.13
    
    ENV S6_REL=latest S6_ARCH=amd64 TZ=Asia/Shanghai
    ENV DOTNET_VER=5.0.6 DOTNET_ARCH=x64
    
    LABEL base.maintainer=Roxedus
    LABEL base.s6.rel=${S6_REL} base.s6.arch=${S6_ARCH}
    LABEL dotnet_version=${DOTNET_VER} dotnet_arch=${DOTNET_ARCH}
    
    RUN 
    	set -eux && 
    	sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories && 
    	apk add --no-cache 
    		curl 
    		tar 
    		bash 
    		ca-certificates 
    		coreutils 
    		shadow 
    		tzdata 
    		libstdc++ 
    		libgcc 
    		icu-libs 
    		libintl 
    		libcap 
    		libssl1.1 
    		zlib 
    		krb5-libs 
    		&& 
    	apk add --no-cache libgdiplus --repository https://mirrors.ustc.edu.cn/alpine/edge/testing/ && 
    	curl -L -s https://github.com/just-containers/s6-overlay/releases/download/v${S6_REL}/s6-overlay-${S6_ARCH}.tar.gz | tar xzf - -C / &&  
    	groupmod -g 1000 users && 
    	useradd -u 1000 -U -d /config -s /bin/false rox && 
    	usermod -G users rox && 
    	mkdir -p 
    		/app 
    		/config && 
    	rm -rf /tmp/* && 
    	mkdir -p /etc/cont-init.d && 
    	echo IyEvdXNyL2Jpbi93aXRoLWNvbnRlbnYgYmFzaAoKUFVJRD0ke1BVSUQ6LTEwMDB9ClBHSUQ9JHtQR0lEOi0xMDAwfQoKZ3JvdXBtb2QgLW8gLWcgIiRQR0lEIiByb3gKdXNlcm1vZCAtbyAtdSAiJFBVSUQiIHJveAoKZWNobyAiClVzZXIgdWlkOiAgICAkKGlkIC11IHJveCkKVXNlciBnaWQ6ICAgICQoaWQgLWcgcm94KQotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCiIKCmNob3duIC1SIHJveDpyb3ggL2FwcApjaG93biAtUiByb3g6cm94IC9jb25maWc= | base64 -d >/etc/cont-init.d/1-prep-env
    
    RUN 
      mkdir -p /usr/share/dotnet 
      && curl -L -s https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/${DOTNET_VER}/aspnetcore-runtime-${DOTNET_VER}-linux-musl-${DOTNET_ARCH}.tar.gz | tar xzf - -C /usr/share/dotnet 
      && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet 
      && setcap CAP_NET_BIND_SERVICE=+eip /usr/share/dotnet/dotnet 
      && mkdir -p /etc/services.d/
    
    RUN mkdir -p /etc/services.d/app1 && 
      echo IyEvdXNyL2Jpbi93aXRoLWNvbnRlbnYgYmFzaAoKRExMPSR7RExMOi19CgpjZCAvYXBwIHx8IGV4aXQKCmV4ZWMgXAoJczYtc2V0dWlkZ2lkIHJveCBkb3RuZXQgJERMTA== | base64 -d >/etc/services.d/app1/run 
    
    VOLUME [ "/config" ]
    
    WORKDIR /app
    
    ENTRYPOINT ["/init"]
    
    EXPOSE 80
    
  • 相关阅读:
    20190430-screen、client、offset、scroll等JS中各种宽度距离
    20190423-Vscode与Sass不得不说的秘密(>^ω^<)
    20190422-外部导入CSS样式之link、CSS@import、Sass分音
    20190421-那些年使用过的CSS预处理器(CSS Preprocessor)之Sass and Less
    20190421-那些年使用过的CSS预处理器(CSS Preprocessor)
    20190409-层叠の层叠上下文、层叠水平、层叠顺序、z-index、伪元素层叠
    20190408-规范书写
    20190404-transition、transform转换、animation、媒体查询
    20190402-display展现、float浮动
    20190401-颜色书写
  • 原文地址:https://www.cnblogs.com/yzpopulation/p/14702723.html
Copyright © 2011-2022 走看看