Skip to content

Commit

Permalink
- Updated docs
Browse files Browse the repository at this point in the history
- Updated compose files to name tdp containers better
  • Loading branch information
elipe17 committed Aug 30, 2024
1 parent f9200cf commit f482707
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
22 changes: 15 additions & 7 deletions docs/Technical-Documentation/nexus-repo.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,29 +40,37 @@ After logging in as root for the first time, you will be taken to a page to set

In order to use Nexus as a Docker repository, the DNS for the repo needs to be able to terminate https. We are currently using cloudflare to do this.

When creating the repository (must be signed in with admin privileges), since the nexus server isn't actually terminating the https, select the HTTP repository connector. The port can be anything you assign, as long as the tool used to terminate the https connection forwards the traffic to that port.
When creating the repository (must be signed in with admin privileges), since the nexus server isn't actually terminating the https, select the HTTP repository connector. The port can be anything you assign, as long as the tool used to terminate the https connection forwards the traffic to that port.

In order to allow [Docker client login and connections](https://help.sonatype.com/repomanager3/nexus-repository-administration/formats/docker-registry/docker-authentication) you must set up the Docker Bearer Token Realm in Settings -> Security -> Realms -> and move the Docker Bearer Token Realm over to Active.
Also, any users will need nx-repository-view-docker-#{RepoName}-(browse && read) at a minimum and (add and edit) in order to push images.

We have a separate endpoint to connect specifically to the docker repository.
[https://tdp-docker.dev.raftlabs.tech](tdp-docker.dev.raftlabs.tech)

e.g. `docker login https://tdp-docker.dev.raftlabs.tech`
e.g.
```
docker login https://tdp-docker.dev.raftlabs.tech
```

### Pushing Images

Before an image can be pushed to the nexus repository, it must be tagged for that repo:

`docker image tag ${ImageId} tdp-docker.dev.raftlabs.tech/${ImageName}:${Version}`
```
docker image tag ${ImageId} tdp-docker.dev.raftlabs.tech/${ImageName}:${Version}
```

then you can push:

`docker push tdp-docker.dev.raftlabs.tech/${ImageName}:${Version}`
```
docker push tdp-docker.dev.raftlabs.tech/${ImageName}:${Version}
```

### Pulling Images

We have set up a proxy mirror to dockerhub that can pull and cache DockerHub images.
Then we have created a group docker repository that can be pulled from. If the container is in our hosted repo, the group will return that container. If not, it will see if we have a cached version of that container in our proxy repo and, if not, pull that from dockerhub, cache it and allow the docker pull to happen.
We do not allow anonymous access on our Nexus instance. With that said, if you have not logged in with Docker you will not be able to pull. If you are logged in:

`docker pull https://tdp-docker-store.dev.raftlabs.tech/${ImageName}:${Version}`
```
docker pull tdp-docker.dev.raftlabs.tech/${ImageName}:${Version}
```
2 changes: 1 addition & 1 deletion tdrs-backend/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ services:
- ELASTICSEARCH_LOG_INDEX_SLOW_LEVEL
volumes:
- .:/tdpapp
image: tdp
image: tdp-backend
build: .
command: >
bash -c "./wait_for_services.sh &&
Expand Down
1 change: 1 addition & 0 deletions tdrs-frontend/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ services:
tdp-frontend:
stdin_open: true # docker run -i
tty: true # docker run -t
image: tdp-frontend
build:
context: .
target: nginx
Expand Down

0 comments on commit f482707

Please sign in to comment.