Question: I am totally new to docker and the client I am working for have sent me dockerfile configuration .dockerignore file probably to set up the work environment. 

So this is basically what he sent to me 

```
FROM node:8

# Create app directory
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app

COPY package.json package-lock.json ./

RUN npm install

COPY assets ./assets
COPY server ./server
COPY docs ./docs
COPY internals ./internals
COPY track ./track

RUN npm run build:dll

COPY . .

EXPOSE 3000

CMD [ "npm", "start" ]

```

with docker build and run command (he also provided the same)

```
 docker build -t reponame:tag .   
 docker run -p 3000:3000 admin-web:v1 

```

Here, First can someone tell me what does `copy . .` mean? 

He asked me to **configure all the ports accordingly**. From going through videos, I remember that we can map ports like this `-p 3000:3000` but what does configuring port means? and how can i do? any relevant article for the same would also be helpful. Do I need to make docker-compose file?

Answer: 
`.` is `current directory` in [linux](/questions/tagged/linux "show questions tagged 'linux'"). So basicly: copy [current](https://stackoverflow.com/questions/23242004/what-is-double-dot-and-single-dot-in-linux) local directory to the current container's directory.

The switch `-p` is used to configure [port mapping](https://docs.docker.com/v17.09/engine/userguide/networking/default_network/binding/). `-p 2900:3000` means publish your local port `2900` to container's `3000` port so that the container is available on the *outside* (by your web browser for instance). Without that mapping the port would not be available to access outside the container. This port is still available to other containers inside same docker network though.
You don't need to make a docker-compose.yml file, but it certainly will make your life easier if you have one, because then you can just run `docker-compose up` every time to run the container instead of having to run 

```
docker run -p 3000:3000 admin-web:v1 

```

every time you want to start your applicaton.

Btw here is one of the ultimate docker cheatsheets that I got from a friend, might help you: <https://gist.github.com/ruanbekker/4e8e4ca9b82b103973eaaea4ac81aa5f>