Create NFS Volumes:
Creating the NFS Volume:
$ docker volume create --driver local \
--opt type=nfs \
--opt o=addr=192.168.1.115,uid=1000,gid=1000,rw \
--opt device=:/mnt/volumes/mysql-test \
mysql-test-1
#!/usr/bin/env bash | |
set -Eeuo pipefail | |
trap cleanup SIGINT SIGTERM ERR EXIT | |
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P) | |
usage() { | |
cat <<EOF | |
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...] |
import requests | |
import time | |
# Login and get a token | |
endpoint = "http://localhost:8008/_matrix/client/r0/login" | |
data = { | |
"type": "m.login.password", | |
"identifier": { | |
"type": "m.id.user", | |
"user": "USER" |
// dependencies | |
const fs = require('fs'); | |
const log = require('../log'); | |
const dockerSecret = {}; | |
dockerSecret.read = function read(secretNameAndPath) { | |
try { | |
return fs.readFileSync(`${secretNameAndPath}`, 'utf8'); | |
} catch(err) { |
Apple removed colored sub-pixel antialiasing in MacOS Mojave | |
(https://developer.apple.com/videos/play/wwdc2018/209/ starting from ~28min) | |
To make fonts look normal in Sublime Text, add to Preferences: | |
// For the editor | |
"font_options": [ "gray_antialias" ], | |
// For the sidebar / other elements | |
"theme_font_options": [ "gray_antialias" ], |
Creating the NFS Volume:
$ docker volume create --driver local \
--opt type=nfs \
--opt o=addr=192.168.1.115,uid=1000,gid=1000,rw \
--opt device=:/mnt/volumes/mysql-test \
mysql-test-1
#!/bin/sh | |
# Enable and disable HDMI output on the Raspberry Pi | |
is_off () | |
{ | |
vcgencmd display_power | grep "display_power=0" >/dev/null | |
} | |
case $1 in |
unless ARGV.size > 0 | |
puts " Missing executable file argument" | |
puts " Usage (in a Dockerfile)" | |
puts " RUN crystal run ./path/to/list-deps.cr -- ./bin/executable" | |
exit 1 | |
end | |
executable = File.expand_path(ARGV[0]) | |
unless File.exists?(executable) |
class Delegator(T) | |
def initialize(@object : T) | |
end | |
def self.delegate(object) | |
new(object) | |
end | |
forward_missing_to @object | |
end |
# This Dockerfile is intended to build a production-ready app image. | |
# | |
# This is not required for development environments | |
FROM sagittaros/rails-base:latest | |
MAINTAINER Felix Tioh <felix.tioh@crowdo.com> | |
COPY . /app | |
WORKDIR /app | |
EXPOSE 5000 |
config.assets.precompile += [ | |
# precompile any CSS or JS file that doesn't start with _ | |
/(^inline[^_\/]|\/[^_])[^\/]*.(js|css)$/, | |
... |