Monkey Blog

My notes & Sharing

Home Archives
2022-08-01

docker Q&A

Docker notes (Q&A)

  1. Dockerfile best practices

  2. How to create a user when using base alpine image?
    Alpine uses the command adduser and addgroup for creating users and groups (rather than useradd and usergroup).

1
2
3
4
5
FROM alpine:latest
# Create a group and user
RUN addgroup -S appgroup && adduser -S appuser -G appgroup
# Tell docker that all future commands should run as the appuser user
USER appuser
Share
  • docker
Newer
nginx: enable basic authentication
Older
k8s-volume

Categories

  • github
  • k8s

Tags

  • Ms932
  • Unicode
  • angular
  • aws
  • basic auth
  • docker
  • docker-swarm
  • elkstack
  • github
  • heml
  • hexo
  • k8s
  • nginx
  • s3
  • ssh

Tag Cloud

Ms932 Unicode angular aws basic auth docker docker-swarm elkstack github heml hexo k8s nginx s3 ssh

Archives

  • September 2022
  • August 2022
  • July 2022
  • February 2022
  • January 2022
  • December 2021
  • March 2021

Recent Posts

  • Create an invidual account, and assign the right permissions in k8s
  • nginx: enable basic authentication
  • docker Q&A
  • k8s-volume
  • s3-cli-cheatsheet
Creative Commons License
All website licensed under CC BY-NC-ND 4.0
© 2022 Monkey192
Powered by Hexo
Home Archives