asciinema / asciinema-server

Platform for hosting and sharing terminal session recordings
https://docs.asciinema.org/manual/server/
Apache License 2.0
2.31k stars 266 forks source link

Refactor Dockerfile #350

Closed amayer5125 closed 4 years ago

amayer5125 commented 4 years ago

mkdir followed by WORKDIR is redundant. WORKDIR will create a directory if it does not exist.

Removed apk update because apk upgrade will automatically update the cache.

Since apk update was already run there is no need to use the --no-cache flag for apk commands.

Reorganize commands to group similar ones.

We don't need to copy the tar.gz file to another directory, we can extract it from the location it already exists. We also don't need to delete the .tar.gz file as it is only used in an intermediate container and will not effect our final image.

Final image: remove apk update we do not need to update the cache since we are using --no-cache on the apk add call.

ku1ik commented 4 years ago

Thanks, these are nice improvements 👌