Skip to content

Commit

Permalink
Merge pull request #2 from Onlineberatung/feat/alpine-image
Browse files Browse the repository at this point in the history
feat: change the base image to alpine
  • Loading branch information
CarlosSoares authored Nov 18, 2022
2 parents 28cb002 + 53cc16c commit 34e353f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
FROM nginx:1.21.0
FROM nginx:1.23.2-alpine

# Remove sym links from nginx image
RUN rm /var/log/nginx/access.log
RUN rm /var/log/nginx/error.log

# Install logrotate
RUN apt-get update && apt-get -y install logrotate && apt-get -y install vim
RUN apk update && apk add logrotate vim

COPY crontab /etc/crontab
COPY nginx-logrotate /etc/logrotate.d/nginx

# Start nginx and cron as a service
CMD service cron start && nginx -g 'daemon off;'
CMD crond -b && nginx -g 'daemon off;'
5 changes: 1 addition & 4 deletions docker-compose-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,4 @@ services:
image: proxynginx:latest
restart: "no"
ports:
- 80:80
volumes:
- ./log:/var/log/nginx
- ./nginx-logrotate:/etc/nginx-logrotate
- 8080:80

0 comments on commit 34e353f

Please sign in to comment.