-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b0bf0e3
commit f9acdb9
Showing
4 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Baseado em: | ||
# - https://docs.docker.com/engine/examples/running_ssh_service/ | ||
# - https://github.com/theodotos/debian-ssh-docker | ||
|
||
FROM debian:stable | ||
|
||
ARG BUILD_DATE | ||
ARG VCS_REF | ||
LABEL maintainer="[email protected]" \ | ||
org.label-schema.build-date=$BUILD_DATE \ | ||
org.label-schema.name="CTIC-SJE-IFSC Kubernetes: qgis" \ | ||
org.label-schema.description="Nuvem privada do Câmpus São José do IFSC" \ | ||
org.label-schema.license="MIT" \ | ||
org.label-schema.url="https://projetos.sj.ifsc.edu.br" \ | ||
org.label-schema.vcs-ref=$VCS_REF \ | ||
org.label-schema.vcs-url="https://github.com/ctic-sje-ifsc/servicos_kubernetes" \ | ||
org.label-schema.vendor="CTIC" \ | ||
org.label-schema.version="3.10.4+15buster" \ | ||
org.label-schema.schema-version="1.0" | ||
|
||
ENV DEBIAN_FRONTEND noninteractive | ||
COPY ./docker-entrypoint.sh / | ||
RUN chmod 0755 /docker-entrypoint.sh && \ | ||
apt update && \ | ||
apt -y upgrade && \ | ||
echo 'deb http://packages.x2go.org/debian stable main' >> /etc/apt/sources.list.d/x2go.list && \ | ||
echo 'deb-src http://packages.x2go.org/debian stable main' >> /etc/apt/sources.list.d/x2go.list && \ | ||
apt -y install curl git mount davfs2 fuse sudo gnupg apt-utils | ||
|
||
RUN apt-key adv --no-tty --keyserver keyserver.cais.rnp.br --receive-keys 0xe1f958385bfe2b6e && \ | ||
apt update && \ | ||
apt -y install openssh-server x2go-keyring x2goserver x2goserver-xsession libglu1-mesa libasound2 libdbus-glib-1-2 | ||
|
||
RUN apt install wget && \ | ||
wget -qO - https://qgis.org/downloads/qgis-2019.gpg.key | sudo apt-key add - && \ | ||
echo 'deb https://qgis.org/debian-ltr buster main' > /etc/apt/sources.list.d/qgis.list && \ | ||
apt update && \ | ||
apt -y install qgis python-qgis qgis-plugin-grass | ||
RUN apt clean && \ | ||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* && \ | ||
mkdir -p /var/run/sshd && \ | ||
install -d -g root -m 0700 -o root /root/.ssh | ||
|
||
RUN useradd -m -d /home/aluno -s /bin/bash aluno && \ | ||
echo "aluno:aluno" | chpasswd | ||
|
||
EXPOSE 22 | ||
ENTRYPOINT ["/docker-entrypoint.sh"] | ||
CMD ["/usr/sbin/sshd", "-D"] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
all: create | ||
|
||
create: | ||
docker build -t cticsjeifsc/qgis . | ||
docker login | ||
docker push cticsjeifsc/qgis |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
# SSH login fix. Otherwise user is kicked off after login | ||
sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd | ||
|
||
echo "X11UseLocalhost no" >> /etc/ssh/sshd_config | ||
|
||
exec "$@" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
|
||
docker build --build-arg VCS_REF=$(git rev-parse --short HEAD) \ | ||
--build-arg BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \ | ||
-t $IMAGE_NAME . |