6 Commits

Author SHA1 Message Date
Vaibhav Kamra
0707d00ab5
Add a Dockerfile for corso (#247)
Adds a Dockerfile under the docker to package the corso binary.

This currently requires the user to build the corso binary (for linux/amd64) in the build image
prior to building the docker image. Follow up PRs will introduce a Makefile.

Also moves the build image to the build folder and adds a couple of README.md files with
instructions.

Fixes #218
2022-06-28 12:15:30 -07:00
ashmrtn
4ac3aa08f0
Fix building base image on Mac. (#22)
Mac uses low group IDs for the default user, which would cause groupadd
to fail as the group already existed. Only make a new group if it
doesn't already exist.

This does raise other questions though as now we are technically having
the container run with a "services" group.
2022-05-09 17:20:03 -07:00
Ashlie Martinez
548ffb02ec Simple shell script to run dev container.
* Mounts the current repo's code in the proper golang path in the
  container
* Container will be destroyed when container is exited
* User will start in the repo's code directory in the container
2022-05-03 15:44:14 -07:00
Ashlie Martinez
9522a33ebe Script file to build a basic dev container image.
* New container will have deps known at the time the container was made
  * If deps change a lot, rebuild/save current container image as deps
    are outside the directory mount
* Deps are not explicitly listed in the container Dockerfile or script
  as go mod is expected to manage them for us
* Automatically creates a container user with UID/GID of the current
  user to avoid file ownership issues
2022-05-03 15:39:53 -07:00
Ashlie Martinez
6d9d4dc8c7 Add some information of note for later scripts.
Mostly using bash filepath mangling and known values to build up
information used to find the proper locations of golang code in a
container.
2022-05-03 15:38:43 -07:00
Ashlie Martinez
0af5f2f141 Very basic golang docker with new user.
* Expects go get/go mod to be used to handle application dependencies
* Expects users to use a volume mount to make code visible to the
  container
* Add a user (with the option of having the same UID/GID as current
  user) to avoid weird file owners when building things in the container
  as golang usually runs as root
2022-05-03 15:31:23 -07:00