🐋 Docker
Updating Repository Image

Updated at 2015-12-15 01:47
  1. docker pull ruksi/my-image:21
  2. docker run -d --name my-container ruksi/my-image:21
  3. docker exec -it my-container /bin/bash
  4. Make changes you want and `exit
  5. docker commit -m "I did stuff" -a "Ruksi" my-container ruksi/my-image:22
  6. docker push ruksi/my-image:22

Edit Environmental Variables

# See image or container environmental variables:
docker inspect -f "{{ .Config.Env }}" <IMAGE_OR_CONTAINER_ID>

# Change image or container environmental variables and make a new image:
docker commit -c "ENV DEBUG true" <IMAGE_OR_CONTAINER_ID> <OWNER>/<REPO>:<TAG>

# But you can change basically anything Dockerfile related:
docker commit -c "EXPOSE 80" <IMAGE_OR_CONTAINER_ID> <OWNER>/<REPO>:<TAG>