Re: Adding secrets to Docker builds

2017-01-28 Thread Ben Parees
https://trello.com/c/NnMBJybJ

On Sat, Jan 28, 2017 at 5:45 PM, Lionel Orellana  wrote:

> Can you send me the link to track it? Thanks.
>
> On Sun., 29 Jan. 2017 at 8:58 am, Ben Parees  wrote:
>
>> Not currently, no. We have a card for it on our backlog.
>>
>> Ben Parees | OpenShift
>>
>> On Jan 28, 2017 6:12 AM, "Lionel Orellana"  wrote:
>>
>> Is it possible to mount volumes other than secrets to builder pods?
>>
>> On 28 January 2017 at 21:17, Lionel Orellana  wrote:
>>
>> I think I got it.
>>
>> The secret is mounted on the builder pod not on the actual container I'm
>> trying to build.
>>
>> This works
>>
>> ADD password /tmp
>> RUN cat /tmp/password
>>
>>
>>
>> On 28 January 2017 at 20:28, Lionel Orellana  wrote:
>>
>> Hi
>>
>> I have a Docker BuildConfig with an inline Dockerfile as the source.I'm
>> trying to add a secret to this build. The secret is called svn-pwd and
>> already exists in the project. It has a single key called 'password'.
>>
>> In the inline Dockerfile I'm trying to find the mounted secret. It is
>> supposed to be in the build working dir (https://trello.com/c/
>> m5bPxwh4/643-8-allow-to-consume-secrets-in-builds) but it's not.
>>
>> In the Dockerfile below I don't see the secret when I do "RUN ls -la",
>> and "RUN cat password" fails.
>>
>> apiVersion: v1
>> kind: BuildConfig
>> spec:
>>   source:
>> type: Dockerfile
>> dockerfile: "FROM  \n\nRUN ls -la \nRUN cat password"
>> secrets:
>>   -
>> secret:
>>   name: svn-pwd
>>   strategy:
>> type: Docker
>> dockerStrategy:
>>   env:
>> -
>>   name: xxx
>>   value: 'xxx'
>>   output:
>> to:
>>   kind: ImageStreamTag
>>   namespace: ipaustralia
>>   name: 'y:latest'
>>
>>
>> Should this working or is there something else I need to do?
>>
>> Thanks
>>
>>
>>
>>
>> ___
>> users mailing list
>> users@lists.openshift.redhat.com
>> http://lists.openshift.redhat.com/openshiftmm/listinfo/users
>>
>>


-- 
Ben Parees | OpenShift
___
users mailing list
users@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users


Re: Adding secrets to Docker builds

2017-01-28 Thread Lionel Orellana
Is it possible to mount volumes other than secrets to builder pods?

On 28 January 2017 at 21:17, Lionel Orellana  wrote:

> I think I got it.
>
> The secret is mounted on the builder pod not on the actual container I'm
> trying to build.
>
> This works
>
> ADD password /tmp
> RUN cat /tmp/password
>
>
>
> On 28 January 2017 at 20:28, Lionel Orellana  wrote:
>
>> Hi
>>
>> I have a Docker BuildConfig with an inline Dockerfile as the source.I'm
>> trying to add a secret to this build. The secret is called svn-pwd and
>> already exists in the project. It has a single key called 'password'.
>>
>> In the inline Dockerfile I'm trying to find the mounted secret. It is
>> supposed to be in the build working dir (https://trello.com/c/m5bPxwh4
>> /643-8-allow-to-consume-secrets-in-builds) but it's not.
>>
>> In the Dockerfile below I don't see the secret when I do "RUN ls -la",
>> and "RUN cat password" fails.
>>
>> apiVersion: v1
>> kind: BuildConfig
>> spec:
>>   source:
>> type: Dockerfile
>> dockerfile: "FROM  \n\nRUN ls -la \nRUN cat password"
>> secrets:
>>   -
>> secret:
>>   name: svn-pwd
>>   strategy:
>> type: Docker
>> dockerStrategy:
>>   env:
>> -
>>   name: xxx
>>   value: 'xxx'
>>   output:
>> to:
>>   kind: ImageStreamTag
>>   namespace: ipaustralia
>>   name: 'y:latest'
>>
>>
>> Should this working or is there something else I need to do?
>>
>> Thanks
>>
>
>
___
users mailing list
users@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users


Re: Adding secrets to Docker builds

2017-01-28 Thread Lionel Orellana
I think I got it.

The secret is mounted on the builder pod not on the actual container I'm
trying to build.

This works

ADD password /tmp
RUN cat /tmp/password



On 28 January 2017 at 20:28, Lionel Orellana  wrote:

> Hi
>
> I have a Docker BuildConfig with an inline Dockerfile as the source.I'm
> trying to add a secret to this build. The secret is called svn-pwd and
> already exists in the project. It has a single key called 'password'.
>
> In the inline Dockerfile I'm trying to find the mounted secret. It is
> supposed to be in the build working dir (https://trello.com/c/
> m5bPxwh4/643-8-allow-to-consume-secrets-in-builds) but it's not.
>
> In the Dockerfile below I don't see the secret when I do "RUN ls -la", and
> "RUN cat password" fails.
>
> apiVersion: v1
> kind: BuildConfig
> spec:
>   source:
> type: Dockerfile
> dockerfile: "FROM  \n\nRUN ls -la \nRUN cat password"
> secrets:
>   -
> secret:
>   name: svn-pwd
>   strategy:
> type: Docker
> dockerStrategy:
>   env:
> -
>   name: xxx
>   value: 'xxx'
>   output:
> to:
>   kind: ImageStreamTag
>   namespace: ipaustralia
>   name: 'y:latest'
>
>
> Should this working or is there something else I need to do?
>
> Thanks
>
___
users mailing list
users@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users


Adding secrets to Docker builds

2017-01-28 Thread Lionel Orellana
Hi

I have a Docker BuildConfig with an inline Dockerfile as the source.I'm
trying to add a secret to this build. The secret is called svn-pwd and
already exists in the project. It has a single key called 'password'.

In the inline Dockerfile I'm trying to find the mounted secret. It is
supposed to be in the build working dir (
https://trello.com/c/m5bPxwh4/643-8-allow-to-consume-secrets-in-builds) but
it's not.

In the Dockerfile below I don't see the secret when I do "RUN ls -la", and
"RUN cat password" fails.

apiVersion: v1
kind: BuildConfig
spec:
  source:
type: Dockerfile
dockerfile: "FROM  \n\nRUN ls -la \nRUN cat password"
secrets:
  -
secret:
  name: svn-pwd
  strategy:
type: Docker
dockerStrategy:
  env:
-
  name: xxx
  value: 'xxx'
  output:
to:
  kind: ImageStreamTag
  namespace: ipaustralia
  name: 'y:latest'


Should this working or is there something else I need to do?

Thanks
___
users mailing list
users@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users