Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions ops/aws/useful-commands.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Useful Commands for AWS (ECR)

## Install AWS CLI

Download AWS CLI based on your OS:\
https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html

## Configure / Login to AWS

``` bash
aws login
```

You'll be prompted for: - AWS Access Key ID\
- AWS Secret Access Key\
- Region (e.g. us-east-2)\
- Output format (json)

## Authenticate Docker to AWS ECR

``` bash
aws ecr get-login-password --region us-east-2 \
| docker login \
--username AWS \
--password-stdin <account-id>.dkr.ecr.<region>.amazonaws.com
```

Example:

``` bash
aws ecr get-login-password --region us-east-2 \
| docker login \
--username AWS \
--password-stdin <account-id>.dkr.ecr.us-east-2.amazonaws.com
```

## Docker Commands

### Tagging Images

``` bash
docker tag <local-img-name> \
<account-id>.dkr.ecr.<region>.amazonaws.com/<repo-name>:<tag>
```

Example:

``` bash
docker tag surigo/anizenith:latest \
<account-id>.dkr.ecr.us-east-2.amazonaws.com/anizenith-repo:latest
```

### Pushing Images

``` bash
docker push <ecr-image-uri>
```

Example:

``` bash
docker push <account-id>.dkr.ecr.us-east-2.amazonaws.com/anizenith-repo:latest
```
6 changes: 3 additions & 3 deletions ops/docker/useful-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
## Commands for building docker images
### Building backend image
```bash
docker build -t surigo/anizenith_backend:latest -f ./backend/Dockerfile --progress=plain --no-cache .
docker buildx build --platform linux/amd64 -t surigo/anizenith_backend:latest -f ./backend/Dockerfile --progress=plain --no-cache .
```

### Building frontend image
```bash
docker build -t surigo/anizenith_frontend:latest -f ./frontend/Dockerfile --progress=plain --no-cache .
docker buildx build --platform linux/amd64 -t surigo/anizenith_frontend:latest -f ./frontend/Dockerfile --progress=plain --no-cache .
```

### Building integrated image (backend + frontend)
```bash
docker build -t surigo/anizenith:latest -f ./Dockerfile --progress=plain --no-cache .
docker buildx build --platform linux/amd64 -t surigo/anizenith:latest -f ./Dockerfile --progress=plain --no-cache .
```

## Commands for pushing docker images to dockerhub
Expand Down
Loading