There are several ways to clone a repository from github. Similar from other providers, such as bitbucket, gitlab, etc.
https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols
Mostly, we use
- http
- ssh
There are several ways to clone a repository from github. Similar from other providers, such as bitbucket, gitlab, etc.
https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols
Mostly, we use
This guide explains how to configure a Git repository to be served anonymously over HTTP using Nginx and git-http-backend
. This setup allows users to clone and fetch repositories without authentication, and optionally push if configured. It’s ideal for public repositories or simple internal use cases.
sudo apt install git
)sudo apt install nginx
)fcgiwrap
installed (sudo apt install fcgiwrap
) to bridge Nginx and git-http-backend
#------------------------------------------------------------------------------------------------------------- | |
# Copyright (c) Microsoft Corporation. All rights reserved. | |
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information. | |
#------------------------------------------------------------------------------------------------------------- | |
FROM openjdk:8-jdk | |
# This Dockerfile adds a non-root user with sudo access. Use the "remoteUser" | |
# property in devcontainer.json to use it. On Linux, the container user's GID/UIDs | |
# will be updated to match your local UID/GID (when using the dockerFile property). |
With git you can have anything versioned. You're used to version your code, which is a bunch of files. Your server configuration (on Linux) is also just a bunch of files, so it can be versioned as well.
The idea is simple: create a git repository in /etc/
and commit everytime you change any configuration of your server. Written in code:
cd /etc
git init
git add .
I don't expect moby/moby#24170 to be solved by Docker team on near future so this gist is about looking for least ugly workarounds which are available today and on near future.
It is possible to create overlay network with use user specified subnet. On this example I create network which is size is two C -class networks ( IP range 10.0.0.0 - 10.0.1.255 ) and force Docker to use IPs from second part of it ( 10.0.1.0 - 10.0.1.255 ).
That way I can make sure that IPs 10.0.0.2 - 10.0.0.254 can be specified to containers and they do not collide with IPs which Docker engine assign for service(s)/container(s).
These instructions include running a local registry accessible from Kubernetes as well as from the
host development machine at registry.dev.svc.cluster.local:5000
.
registry:2
container from Docker, listening on port 5000
, and persisting images in the ~/.registry/storage
directory.
A Bash script for Debian/Ubuntu-based systems that will install Docker (if not already installed) and configure it to use a specified directory (presumably on your mounted external drive) for storing containers, images, volumes, etc.
Important Considerations BEFORE Running:
/etc/fstab
) at the same path every time./var/lib/docker
and it's important, BACK IT UP before running this script. The script attempts to move existing data, but failures can happen.sudo
.apt
), repository sServe a local directory of static assets - using one-line solutions and no scripts
The first solution uses an IDE extension, while the rest involve using the command-line (intended for macOS and Linux, but they will hopefully work on Windows too).
Table of contents
server { | |
listen 80; | |
server_name www.example.com example.com; | |
# Redirect all traffic to SSL | |
rewrite ^ https://$host$request_uri? permanent; | |
} | |
server { | |
listen 443 ssl default_server; |