forked from devurandom/firefox-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
14 lines (13 loc) · 662 Bytes
/
Makefile
File metadata and controls
14 lines (13 loc) · 662 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
ifeq ($(FIREFOX_VERSION),)
FIREFOX_VERSION = 109.0-1
endif
.PHONY: all
all:
# Update Debian base image
docker pull $(shell grep ^FROM Dockerfile | cut -d' ' -f2)
# Build new version
docker build --no-cache=true -t capriott/docker-firefox:v$(FIREFOX_VERSION) .
# Tag newly created version as latest
docker tag capriott/docker-firefox:v$(FIREFOX_VERSION) capriott/docker-firefox:latest
# Remove container if it is not currently running
( docker ps | awk '$$NF=="firefox"{found=1} END{if(!found){exit 1}}' && echo "Please restart firefox manually" ) || ( docker ps -a | awk '$$NF=="firefox"{found=1} END{if(!found){exit 1}}' && docker rm firefox ) || true