$ docker
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
FROM golang:1.7 | |
# Install glide | |
RUN curl https://glide.sh/get | sh | |
RUN mkdir -p /go/src/github.com/App | |
COPY . /go/src/github.com/App | |
WORKDIR /go/src/github.com/App | |
# Install go packages |
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
FROM nidhi11594/node-go:latest | |
# Install glide | |
RUN curl https://glide.sh/get | sh | |
RUN mkdir -p /go/src/github.com/App | |
COPY . /go/src/github.com/App | |
WORKDIR /go/src/github.com/App | |
# Install node packages |
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
import ( | |
"github.com/ssdb/gossdb/ssdb" | |
"strconv" | |
"time" | |
) | |
var priorityQueue *ssdb.Client | |
func pushToQueue() { | |
key := "xyz" // Some unique key |
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
FROM golang:1.8.5-stretch | |
RUN set -ex; \ | |
apt-get update; \ | |
apt-get install -y --no-install-recommends \ | |
autoconf \ | |
automake \ | |
bzip2 \ | |
dpkg-dev \ | |
file \ |
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
git clone https://github.com/longxinH/xhprof.git ./xhprof | |
cd xhprof/extension/ | |
phpize | |
./configure --with-php-config=/usr/local/bin/php-config | |
make | |
sudo make install |
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
package main | |
import ( | |
"fmt" | |
"encoding/json" | |
) | |
func maxHeap (input []int) { | |
l := len(input) | |
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
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
) | |
type Queue []int | |
var n int |
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
Course url: https://linuxacademy.com/containers/training/course/name/docker-deep-dive-part-1 | |
==================== All Docker Command While Learning Docker ========================= | |
Get a list of all of the Docker commands: | |
docker -h | |
====== Attaching to Container , run in background , name it ========== | |
Create a container and attach to it: |
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
These are the 4 changes required to generate core dump | |
1. Run docker container in privileged mode | |
2. Add CoreDumpDirectory /tmp in apache2.conf | |
3. Set core pattern | |
echo '/tmp/core.%h.%e.%t' > /proc/sys/kernel/core_pattern | |
4. Set core files to unlimited | |
ulimit -c unlimited |
OlderNewer