SORU
30 NİSAN 2014, ÇARŞAMBA


Klon özel gıt dockerfile ile repo

Çeşitli çalışma dockerfiles etrafında nedir bu kod kopyalanamaz var, işte benimki:

FROM ubuntu

MAINTAINER Luke Crooks "luke@pumalo.org"

# Update aptitude with new repo
RUN apt-get update

# Install software 
RUN apt-get install -y git python-virtualenv

# Make ssh dir
RUN mkdir /root/.ssh/

# Copy over private key, and set permissions
ADD id_rsa /root/.ssh/id_rsa
RUN chmod 700 /root/.ssh/id_rsa
RUN chown -R root:root /root/.ssh

# Create known_hosts
RUN touch /root/.ssh/known_hosts

# Remove host checking
RUN echo "Host bitbucket.org\n\tStrictHostKeyChecking no\n" >> /root/.ssh/config

# Clone the conf files into the docker container
RUN git clone git@bitbucket.org:Pumalo/docker-conf.git /home/docker-conf

Bu bana hata veriyor

Step 10 : RUN git clone git@bitbucket.org:Pumalo/docker-conf.git /home/docker-conf
 ---> Running in 0d244d812a54
Cloning into '/home/docker-conf'...
Warning: Permanently added 'bitbucket.org,131.103.20.167' (RSA) to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
2014/04/30 16:07:28 The command [/bin/sh -c git clone git@bitbucket.org:Pumalo/docker-conf.git /home/docker-conf] returned a non-zero code: 128

Bu benim ilk kez dockerfiles kullanıyor, ama (ve çalışma yapılandırmaları alınan) ben okudum ne, bu neden işe yaramayacağını görüyor.

Benim id_rsa benim dockerfile aynı klasör içerisinde bu repo hiçbir sorun klon olan yerel anahtarımı bir kopyasıdır.

Düzenleme:

Benim dockerfile ben ekleyebilirim:

RUN cat /root/.shh/id_rsa

Ve doğru anahtar yazdırır, doğru kopyalanan onun biliyorum.

Ayrıca noah tavsiye ettiği gibi yapmaya çalıştım ve koştu:

RUN echo "Host bitbucket.org\n\tIdentityFile /root/.ssh/id_rsa\n\tStrictHostKeyChecking no" >> /etc/ssh/ssh_config

Ne yazık ki bu da işe yaramıyor.

CEVAP
1 Mayıs 2014, PERŞEMBE


Anahtarımı soruna neden olan, bir çalışma dosyası şimdi aşağıda listelenmiştir (gelecek google'cuların yardım için) şifre korumalı

FROM ubuntu

MAINTAINER Luke Crooks "luke@pumalo.org"

# Update aptitude with new repo
RUN apt-get update

# Install software 
RUN apt-get install -y git
# Make ssh dir
RUN mkdir /root/.ssh/

# Copy over private key, and set permissions
ADD id_rsa /root/.ssh/id_rsa

# Create known_hosts
RUN touch /root/.ssh/known_hosts
# Add bitbuckets key
RUN ssh-keyscan bitbucket.org >> /root/.ssh/known_hosts

# Clone the conf files into the docker container
RUN git clone git@bitbucket.org:User/repo.git

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • Alexey - servant of Christ

    Alexey - ser

    15 EYLÜL 2007
  • Louis C.K.

    Louis C.K.

    18 HAZİRAN 2006
  • Visual Life

    Visual Life

    3 Temmuz 2006