- ざっくり概要として、CMDとENTRYPOINT どちらを使うかによって
docker run CONTAINER_ID <command>
した際の<command>
が及ぼす影響 が変わる
- Dockerfile
#!/usr/bin/env ruby | |
require 'net/https' | |
require 'json' | |
require 'uri' | |
require 'pp' | |
@netatmo_config = { | |
client_id: 'XXXXXXXXXXXXXXXXXXXXXXXXX', | |
client_secret: 'XXXXXXXXXXXXXXXXXXXXXXXXX', |
#!/bin/sh | |
sudo yum -y install autoconf automake cmake freetype-devel gcc gcc-c++ git libtool make mercurial nasm pkgconfig zlib-devel | |
mkdir /tmp | |
#Yasm | |
cd /tmp | |
git clone --depth 1 git://github.com/yasm/yasm.git | |
cd yasm | |
autoreconf -fiv |
#!/bin/bash | |
set -x | |
export SHA1=`echo ${CIRCLE_SHA1} | cut -c1-7` | |
# 引数で配布先のbucketを分けたい | |
if [ $#$ -ne 1 ]; then | |
export SL_COLOR="danger" | |
export SL_TEXT="Sync failure: Not enough args in CircleCI: $S3 - ${CIRCLE_BRANCH} (<${CIRCLE_COMPARE_URL}|${SHA1}>) by ${CIRCLE_USERNAME} !!" | |
export SL_ICON="http://cdn.dev.classmethod.jp/wp-content/uploads/2014/05/aws_icon-s3_white-200x200.png" |
docker run CONTAINER_ID <command>
した際の<command>
が及ぼす影響 が変わる class CopyCommand
attr_reader :destination, :source
def initialize(source, destination)
@source = source
@destination = destination
end
#/usr/bin/env ruby | |
require 'fileutils' | |
DIR = "./content/post/" | |
Dir.chdir(DIR) | |
# FIX: date format | |
# find ./content/post/ -type f -exec sed -i "" -e 's/date: \([0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}\) \([0-9]\{2\}:[0-9]\{2\}\).*$/date: \1T\2:00+09:00/g' {} \; |
package main | |
import ( | |
"bytes" | |
"fmt" | |
"html/template" | |
) | |
func main() { | |
type PersonalData struct { |
package main | |
import ( | |
"archive/zip" | |
"os" | |
"path" | |
"github.com/k0kubun/pp" | |
) |
module Ruboty | |
module Handlers | |
class Test < Base | |
on( | |
/test\z/i, # "@ellen ping"に反応して | |
name: "test", # #pingメソッドが呼ばれる | |
description: "TTT" # これは"@ellen help"でhelpを表示したとき説明文として表示される | |
) | |
def test(message) |
#!/usr/bin/env ruby | |
require 'benchmark' | |
# Struct | |
s = Struct.new(:foo, :bar, :baz) | |
s = s.new(nil, nil, nil) | |
# Hash | |
h = {foo: nil, bar: nil, baz: nil} |