Updated 4/11/2018
Here's my experience of installing the NVIDIA CUDA kit 9.0 on a fresh install of Ubuntu Desktop 16.04.4 LTS.
#!/bin/bash | |
# check, if another export is currently running | |
if [ `ps -ef|grep "keycloak.migration.action=export" |grep -v grep |wc -l` != 0 ] ; then | |
echo "Another export is currently running"; | |
exit 1; | |
fi | |
# try to extract keycloak home from running keycloak instance | |
KEYCLOAK_HOME=$(ps -ef|grep -v grep|grep jboss.home.dir|grep keycloak|sed 's/.*\(jboss.home.dir=\)//'|awk '{print $1}') |
FROM ubuntu | |
RUN apt-get install ... | |
# grab gosu for easy step-down from root | |
ENV GOSU_VERSION 1.10 | |
RUN set -x \ | |
&& curl -sSLo /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \ | |
&& curl -sSLo /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \ | |
&& export GNUPGHOME="$(mktemp -d)" \ |
# Using edge-git ensures we're always pulling the latest | |
# You can lock into a specific version using the *-git tags | |
# on https://hub.docker.com/_/docker/ | |
image: docker:edge-git | |
services: | |
- docker:dind | |
# If you only need compose in a specific step definitely put this | |
# only in that step so it's not executed unnecessarily | |
before_script: |
#!/bin/bash | |
D=/home/www-sftp | |
U=$1 | |
if [ "$EUID" -ne 0 ]; then | |
echo "Requires root permission .." | |
echo "Usage: 'sudo $0 newusername'" | |
exit 1 | |
fi |
Updated 4/11/2018
Here's my experience of installing the NVIDIA CUDA kit 9.0 on a fresh install of Ubuntu Desktop 16.04.4 LTS.
image: gitlab.dev.terastrm.net:4567/terastream/cisco-nso/ci-cisco-nso:4.2.3 | |
stages: | |
- build | |
- mr-robot | |
variables: | |
NCS_VERSION: "4.2.3" | |
DOCKER_REGISTRY: "gitlab.dev.terastrm.net:4567/terastream/cisco-nso" | |
TARGET_REGISTRY: "repo.dev.terastrm.net:5000/" |
apiVersion: v1 | |
kind: Namespace | |
metadata: | |
name: sftp | |
--- | |
kind: Service | |
apiVersion: v1 | |
metadata: |
#!/bin/bash | |
set -euo pipefail | |
openssl req -new -text -passout pass:abcd -subj /CN=localhost -out server.req -keyout privkey.pem | |
openssl rsa -in privkey.pem -passin pass:abcd -out server.key | |
openssl req -x509 -in server.req -text -key server.key -out server.crt | |
chmod 600 server.key | |
test $(uname -s) = Linux && chown 70 server.key | |
docker run -d --name postgres -e POSTGRES_HOST_AUTH_METHOD=trust -v "$(pwd)/server.crt:/var/lib/postgresql/server.crt:ro" -v "$(pwd)/server.key:/var/lib/postgresql/server.key:ro" postgres:12-alpine -c ssl=on -c ssl_cert_file=/var/lib/postgresql/server.crt -c ssl_key_file=/var/lib/postgresql/server.key |
#!/bin/bash | |
# Run commands in the Docker container with a particular UID and GID. | |
# The idea is to run the container like | |
# docker run -i \ | |
# -v `pwd`:/work \ | |
# -e LOCAL_USER_ID=`id -u $USER` \ | |
# -e LOCAL_GROUP_ID=`id -g $USER` \ | |
# image-name bash | |
# where the -e flags pass the env vars to the container, which are read by this script. | |
# By setting copying this script to the container and setting it to the |