patryklaskowski / website-project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Website Project


Requirements

  • Environment variables:
    • MONGODB_PASSWORD e.g. "developer"

How to start


Docker cheatsheet

Run custom Docker container

  1. Prepare Dockerfile

    FROM python:3.9-alpine
    RUN apk update && \
        apk add bash
  2. Build image named my-example-image based on Dockerfile in current directory (.)

    docker build . --tag my-example-image:latest --file Dockerfile
  3. Run container executing bash command interactively

    docker run -it --rm -v $(pwd):/my-workspace my-example-image:latest bash
    • -v mounts current directory to my-workspace path in container
  4. Publish image to DockerHub

    1. Tag image
      docker tag my-example-image:latest patryklaskowski/my-example-image:latest
    2. Log in to DockerHub
      docker login --username $DOCKER_USERNAME --password $DOCKER_PASSWORD
    3. Push your image to DockerHub
      docker push patryklaskowski/my-example-image:latest

About


Languages

Language:HTML 53.6%Language:Python 41.7%Language:Makefile 3.3%Language:Dockerfile 1.4%