When implementing your project, the need for some module, library, service provider or something else will arise, and sometimes you’ll have to implement it yourself. So, how to do that? The solution to this problem is described here. I like this decision all but speed. Therefore, it was written this script that clones the local repository with the package into a folder of your project vendor.
This file contains 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
#!/bin/bash | |
#https://container-solutions.com/adding-self-signed-registry-certs-docker-mac/ | |
#https://docs.docker.com/registry/insecure/#use-self-signed-certificates | |
curl -sSL https://get.docker.com | sh | |
usermod -aG docker ubuntu | |
curl -L https://github.com/docker/compose/releases/download/1.23.2/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose |
This file contains 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
# /etc/systemd/system/docker-compose-registry.service | |
[Unit] | |
Description=Docker Compose Registry Service | |
Requires=docker.service | |
After=docker.service | |
[Service] | |
Type=oneshot | |
RemainAfterExit=yes |
This file contains 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
registry: | |
restart: always | |
image: registry:2 | |
ports: | |
- 5000:5000 | |
environment: | |
REGISTRY_HTTP_TLS_CERTIFICATE: /certs/domain.crt | |
REGISTRY_HTTP_TLS_KEY: /certs/domain.key | |
REGISTRY_AUTH: htpasswd | |
REGISTRY_AUTH_HTPASSWD_PATH: /auth/htpasswd |
This is a requirement for brew in the next step. You can install XCode and then install Command Line Tools through the XCode preferences, or you can install just the Command Line Tools.
$ xcode-select --install
NewerOlder