Skip to content

c0destack/golearn

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

golearn

Learning Go

I have just started learning Go.
This repository contains very basic programs in Go.
Some points to be noted:

  • Check for your GOPATH and put your program there only.
  • Use go env to check you GOPATH.
  • If you want to run the program from your directory then change the GOPATH to that directory.

Steps to follow:

  • Install docker
  • Make a Dockerfile for your progam.
  • First build the binaries using sudo docker built -t imagename . ('.' refers your current directory)
  • To display the images use sudo docker images
  • To display the running containers sudo docker ps
  • To remove the image run sudo docker image rm imagename or sudo docker image rm -f imagename
  • To stop the container run sudo docker stop container_id
  • Now start container using sudo docker run -t imagename:latest arg1 arg2 ... {for example pass http://www.yourwebsite.com as arg1}
  • Start container using sudo docker run -p 8080:8080 imagename:latest

Packages

No packages published

Languages

  • Go 98.1%
  • Dockerfile 1.6%
  • Shell 0.3%