Created
January 23, 2018 02:36
-
-
Save aaronanderson/85759a40afb6cc3c5202d38713e253dd to your computer and use it in GitHub Desktop.
Nexus Maven repository setup in AWS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Nexus setup | |
https://medium.com/@betz.mark/ten-tips-for-debugging-docker-containers-cde4da841a1d | |
https://github.com/sonatype/docker-nexus3 | |
create cluster | |
nexus-maven-repository-cluster | |
use existing VPS, select any of the subnets, create a new security group | |
T2 small instance, VM requires 1.2GB | |
create a new nexus-maven-repository keypair | |
edit VPS security group, edit inbound rules, add SSH (22) TCP (6) 22 0.0.0.0/0 | |
ssh into container, i.e. [email protected] | |
sudo -s | |
Create and change nexus-data directory permissions! | |
https://stackoverflow.com/a/36408833 | |
mkdir /nexus-data | |
chown -R 200:200 /nexus-data | |
cd /var/lib/docker/containers/ | |
create task | |
nexus-maven-repository-task | |
add volume - | |
name nexus-maven-repository-data | |
no source path, let docker put it in /var/lib/docker/volumes | |
add container - | |
nexus-maven-repository-container | |
sonatype/nexus3 | |
soft memory limit 1200 (from docker file) | |
host port 8081 container 8081 (no loadbalancing so don't set host to dynamic port value zero) | |
mount nexus-maven-repository-data nexus-data:/nexus-data | |
log json-file | |
save | |
create service | |
nexus-maven-repository-service | |
default task, no loadbalancer, no scaling | |
logging into running container: | |
docker exec -it "63d8" bash | |
docker cleanup | |
docker rm $(docker ps -aq) | |
docker rmi $(docker images -q) | |
Re-running failed docker container | |
https://stackoverflow.com/a/35387446 | |
docker ps -a | |
docker commit 6934ada98de6 | |
sha256:7015687976a478e0e94b60fa496d319cdf4ec847bcd612aecf869a72336e6b83 | |
docker run -it 7015687976a4 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment