[SAC] [OSGeo] #2681: Create sac-docker.osgeo.org

#2681: Create sac-docker.osgeo.org
---------------------------+---------------------------------------
Reporter: robe | Owner: sac@…
     Type: task | Status: new
Priority: normal | Milestone: Sysadmin Contract 2021-II
Component: Systems Admin | Keywords:
---------------------------+---------------------------------------
I will create a sac-docker.osgeo.org on repo.osgeo.org that we can use to
hold our custom docker images managed by sac team.

The first one I plan to store there is for pretalx as we need to revise it
to have additional plugins we are using.

--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/2681&gt;
OSGeo <https://osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.

#2681: Create sac-docker.osgeo.org
---------------------------+----------------------------------------
Reporter: robe | Owner: sac@…
     Type: task | Status: closed
Priority: normal | Milestone: Sysadmin Contract 2021-II
Component: Systems Admin | Resolution: fixed
Keywords: |
---------------------------+----------------------------------------
Changes (by robe):

* status: new => closed
* resolution: => fixed

Comment:

Done.

Basic steps to create the sac docker repo.

1) Register CNAME sac-docker.osgeo.org on PAIR -> nexux.osgeo.org
2) Login into repo.osgeo.org, create a new repository - of type docker
(hosted) and called sac-docker. Other items you can take the default.

3) Navigate to repository docker and add sac-docker to the group
https://repo.osgeo.org/#admin/repository/repositories:docker

3) Add entry on osgeo3-osgeo3-nginx - /etc/nginx/sites-
available/docker.osgeo.org -- committed here -
https://git.osgeo.org/gitea/sac/osgeo3/commit/37ca6094b634f28f2a563bc8f8ec7224725bb0bf

4) sudo nginx -t (make sure no errors)
5) sudo systemctl nginx reload
6) sudo certbot -d docker.osgeo.org -d geos-docker.osgeo.org -d geoserver-
docker.osgeo.org -d postgis-docker.osgeo.org -d sac-docker.osgeo.org

This will give a notice you already have a cert for docker.osgeo.org and 3
of the set, do you want to Expand. Choose E for expand.

#to push to the repo, you need to do:

{{{
docker login sac-docker.osgeo.org
#type in your osgeo ldap credentials

#in order to push an image you need to tag it with sac-docker.osgeo.org
e.g. for pretalx I did

sudo docker tag 530bb sac-docker.osgeo.org/sac/pretalx-osgeo:latest
sudo docker push sac-docker.osgeo.org/sac/pretalx-osgeo:latest

}}}

Pushing is locked down, but pulling can be done anonymously with:

{{{
docker pull docker.osgeo.org/sac/pretalx-osgeo:latest
}}}

--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/2681#comment:1&gt;
OSGeo <https://osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.