delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2017/10/08/12:02:37

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:from:date:message-id:subject:to
:content-type; q=dns; s=default; b=tG6AMDZVZgIdUDM039i1V8DheZzCa
Ubm5E2FItJRELJV+cLBZM65YLI4UbrCHErWV83RweOfl1P6kuDITUg3x9tCP1cnS
P7DQCveMrdsN2qkZeZMf3fFwH3u4+HDylzFCa0g68gc4UoHhLU0Yc+Wu8d3/nnxn
USUsAisaKb28RM=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:from:date:message-id:subject:to
:content-type; s=default; bh=EoGUD7wXE8eRQU/sLeOZGSZnpEE=; b=BVp
HMoFEYaYAfJNsqS6MQj1Q3IfnlN1GTzuptXJucaZsiHFA2BfUyDP6+JITNbI/9sf
OgHqquxnNBNIyndmMa0bvNCDBG2ItXReK0BI1xLNDeXoJ8X8Fx4ZzzT6WMqce5wi
B9bkkXZoq8sc0fKD7xqIfqyjPVSeaqzWSDIu5syQ=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=3.4 required=5.0 tests=AWL,BAYES_20,EXECUTABLE_URI,KAM_EXEURI,KAM_INFOUSMEBIZ,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM autolearn=no version=3.3.2 spammy=Andy, sk:mirror., UD:github.com, suppose
X-HELO: mail-lf0-f67.google.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=8vlNgwBpyLWYIqkBf5PuXzJsIhmRWyYjXqTUEP+14BM=; b=gruguWpluRiwatY5cNcELI0Ad9tizHe21TIxq1VCKauQ6dB0LbWLV8lr4orzKPnluI NAVA/qNtubQksEx/TYvSzv8halTpyUdr+duIvKjbvQvYyrPPPPuuGTiO53Ld2cdNLGb6 lSmQtmMiUWN5AV/m2BpdewRTpZzDj8fESXnHUXSxvWsqUcS/DaJjAteSFH12TPAApzpd cRM3+2arvqNGw3gACEr5MSIvZ2xTCzu8YKXF6W8Lz8OBaYetoPduxCiZIBma6uhERLbs 7q1yfJnorX3GuxHKaJhj7Y0YEzB6cfx73bzBWf2EGloVoM7C+/PKRr2W/RVcU6XxSizk VQRw==
X-Gm-Message-State: AMCzsaW5leD0NzB9vFbtma6MOhX45wDVV2N33ukZ/eJjXUb6yTuUVZWy B86xbe5ndpmH2fXtnQQvsi+CZB1uL6mFE9h0UU1J41bt
X-Google-Smtp-Source: AOwi7QBcur+uEHcA5I1gf8bhW6VZB/XzixaZQna/HQ3L78XhdagZvzYmlAjJWLmSkfWWirkHPggikSzW2A5qCYpgVl0=
X-Received: by 10.46.17.90 with SMTP id f87mr3328036lje.160.1507478542650; Sun, 08 Oct 2017 09:02:22 -0700 (PDT)
MIME-Version: 1.0
From: Andy Li <andy AT onthewings DOT net>
Date: Mon, 9 Oct 2017 00:01:51 +0800
Message-ID: <CAM-5HMv3LX-0_CGQiHMnQERTjwaPfySmqoYVTopNweB2-h+Pxg@mail.gmail.com>
Subject: Cygwin Docker image
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes

Hi,

I'm trying to create a Cygwin Docker image, in order to have a
completely isolated Cygwin environment.

I'm able to install Cygwin in the Windows Server Core image, but the
installed bash.exe exits immediately when I run it. The exit code is
0, so I suppose it is not a crash. Do you have any idea why this
happen?

Here is the Dockerfile I have (can also be viewed in
https://gist.github.com/andyli/0fc84d60bf29b54b8213fba8ff7d8d24/44a6e02aa340baa721c2707095d7143127544fd8#file-dockerfile):

    FROM microsoft/windowsservercore

    SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"]

    RUN $url = 'https://cygwin.com/setup-x86_64.exe'; \
        Write-Host ('Downloading {0} ...' -f $url); \
        Invoke-WebRequest -Uri $url -OutFile 'C:/setup-x86_64.exe'; \
        \
        Write-Host 'Installing ...'; \
        New-Item -ItemType directory -Path 'C:/tmp'; \
        Start-Process "C:/setup-x86_64.exe" -NoNewWindow -Wait
-PassThru -ArgumentList
@('-q','-v','-n','-B','-R','C:/cygwin64','-l','C:/tmp','-s','http://mirror.pkill.info/cygwin/','-P','default');
\
        \
        Write-Host 'Removing ...'; \
        Remove-Item -Path 'C:/tmp' -Force -Recurse -ErrorAction Ignore; \
        \
        Write-Host 'Verifying install ...'; \
        Start-Process "C:/cygwin64/bin/cygcheck.exe" -NoNewWindow
-Wait -PassThru -ArgumentList @('-c'); \
        \
        Write-Host 'Complete.';

    CMD ["C:/cygwin64/bin/bash.exe"]

To build it, run
   docker build -t cygwin .

To create a container and start cmd:
   docker run -it --rm cygwin cmd

Any help is appreciated.

Best regards,
Andy

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019