Closed sam-mix closed 3 years ago
I guess you didn't create image locally because golang-example-app:development
no public image -
Steps -
make install
(create folder and install packages for wire, sql-migration and dataloaden), maybe it is not needed just to check, but it will be needed to test the librariesmake dependencies
, it's just go mod download
to download packages from go.mod
DOCKER_IMAGE=golang-example-app TAG=development make docker-image
- command creates docker image based on this repo locally with artifacts(configs and etc)docker compose up
you can check it - https://github.com/Aristat/golang-example-app/blob/master/scripts/docker-compose-start.sh
REMOVE_CONTAINERS=on
- removes the old docker image latest before every new creation, this is just for convenience
In a real project, it is better to use some kind of circleci
is for generate image and AWS ECR
is for storing images or their analogues
NOTE: In this example, I did not save the ready-made docker image, the example was made just to show how to create a docker image
or it makes sense to move these steps into the docker layer, but I didn't have time to do it 😄 (maybe I'll look at it this week to make it easier to work with docker without install packages and golang locally and etc)
thank you.