# How to customize the NB\_UID when building the image

**URL:** https://discourse.jupyter.org/t/how-to-customize-the-nb-uid-when-building-the-image/4939
**Category:** General
**Tags:** how-to, help-wanted, repo2docker
**Created:** [June 22, 2020, 10:00am UTC](https://discourse.jupyter.org/t/how-to-customize-the-nb-uid-when-building-the-image/4939 "2020-06-22T10:00:31Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![acracker](https://avatars.discourse-cdn.com/v4/letter/a/d78d45/32.png) [@acracker](https://discourse.jupyter.org/u/acracker)
#### Post date: [June 22, 2020, 10:00am UTC](https://discourse.jupyter.org/t/how-to-customize-the-nb-uid-when-building-the-image/4939/1 "2020-06-22T10:00:32Z")

</div>

Dockerfile:

> ARG BASE\_CONTAINER=jupyter/base-notebook  
> FROM $BASE\_CONTAINER
> 
> ARG NB\_UID=“888”  
> ARG NB\_GID=“1001”  
> RUN echo “$NB\_USER $NB\_UID $NB\_GID”

and execute this command:

> docker build --no-cache --build-arg NB\_UID=888 --build-arg NB\_GID=1001 -t test .

Output:

> Sending build context to Docker daemon 2.048kB  
> Step 1/5 : ARG BASE\_CONTAINER=jupyter/base-notebook  
> Step 2/5 : FROM $BASE\_CONTAINER  
> —\> 43c995183265  
> Step 3/5 : ARG NB\_UID=“888”  
> —\> Running in eea0dc4efa37  
> Removing intermediate container eea0dc4efa37  
> —\> e79851088d6c  
> Step 4/5 : ARG NB\_GID=“1001”  
> —\> Running in 10d66f8f506c  
> Removing intermediate container 10d66f8f506c  
> —\> 7e7787a3c771  
> Step 5/5 : RUN echo “$NB\_USER $NB\_UID $NB\_GID”  
> —\> Running in 1d83df4e6943  
> jovyan 1000 100  
> Removing intermediate container 1d83df4e6943  
> —\> 7712cf85a7d8  
> Successfully built 7712cf85a7d8  
> Successfully tagged test:latest

Why is the result of “_RUN echo $NB\_USER $NB\_UID $NB\_GID_” _jovyan 1000 100_ not _jovyan 888 1001_
