Skip to content
This repository was archived by the owner on Nov 16, 2023. It is now read-only.

Comments

updating dockerfile and readme with info on COPY and wildcards in Docker#1

Open
JamesEarle wants to merge 2 commits intoAzure-Samples:masterfrom
JamesEarle:dockerfile-change
Open

updating dockerfile and readme with info on COPY and wildcards in Docker#1
JamesEarle wants to merge 2 commits intoAzure-Samples:masterfrom
JamesEarle:dockerfile-change

Conversation

@JamesEarle
Copy link

The old notation for the Docker COPY statement in the Dockerfile does not maintain directory structure when moved to the destination folder. This is fine for the aci-helloworld sample, but any other application with files in one or more directory will break as a result of this. I've updated the sample Dockerfile and provided a bit of detail into the COPY command and wildcard characters.


# Note

Most, if not all, Dockerfiles contain commands that copy your source code to the container. It is helpful to note that when copying files from your application into the container, you can use wildcard characters such as `*` and `?`. The `*` character will add all files to the destination directory that match it's pattern. The `?` character will do the same but can only be replaced by a single character.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"...match its pattern." (no ')

d73e9071a2d0 aci-hello-world "npm start" 10 seconds ago Up 10 seconds 8080/tcp, 0.0.0.0:8080->80/tcp keen_jepsen
```

If your container has a statys of `Exited(1)` you know something has gone wrong. Take a look at your application logs using the `docker logs` command to debug. If there are any application errors, they will be shown here.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As this image is intended as an ACI learning vehicle, perhaps mention also how to view logs via the Azure CLI: az container logs

Also, typo: statys (status)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants