Posts

Showing posts from November, 2019

Git mistakes - 1

Git mistakes - 1 Hello Coders… I hope you are having a great weekend. Today I am going to talk about My Git mistake . I was working with a project where I tried to add opentracing to it (which is still not working properly). First I created a new branch from my development branch using : git checkout -b tracing Then tried to add opentracing to it, there were many errors and I was fixing one by one and committed all the codes properly. At certain point I had to revert my git branch to a previous commit I made. Then I was working on that. Didnt merge the commits back to original tracing branch. When I try to merge them with my tracing branch , I was getting a lots of errors. Tried to fix them ( merge conflicts ), but they were not working as expected. Finally I found a solution for this problem. This is kind of shortcut. Create a new branch from the current HEAD detached branch. Eg : git branch tmp git-hash-id Delete remote branch git push origin

Docker Development - Mistakes 1

Docker Development - Mistakes 1 Hello dear coders How had you been? I hope you all doing great. Today I am going to talk about my long (yet very small in total) development using docker experiences. First lets see a simple docker file from my recent hobby project. FROM golang:alpine RUN apk update RUN apk add git COPY . /go/src WORKDIR /go/src RUN set -e \ go get github.com/opentracing/opentracing-go \ && go get github.com/uber/jaeger-client-go \ && go get github.com/uber/jaeger-client-go/config RUN go build -o main . RUN chmod 755 main CMD [ "./main" ] This dockerfile based on golang:alpine and just add git to docker-image. Then copy current working directory to /go/src Set working directory and installing opentracing packages. Finally just build and running main go module. What is the so called docker mistake here? Here I didnt notice that, but when every time I run docker-compose up --build after changing the code opent