Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
config:docker-compose [2019/06/24 20:31] – Folding in editor added janaxconfig:docker-compose [2024/06/02 16:46] (current) – Remove Dockerfile filetype as it is included in Geany enrico
Line 5: Line 5:
 [[http://www.docker.com|Docker]] is a computer program that performs operating-system-level virtualization, also known as "containerization" [[http://www.docker.com|Docker]] is a computer program that performs operating-system-level virtualization, also known as "containerization"
  
-This page describe how to add basic Dockerfile syntax highlighting on Geany.  +This page describe how to add basic docker-compose file syntax highlighting to Geany.  
-In additionit adds docker-compose syntax highlighting+ 
 +//**Note:**// Since Geany 2.1 a filetype for Dockerfiles is included in Geany.  
 +For older versionsthe filetype can be manually installed from https://github.com/geany/geany/blob/master/data/filedefs/filetypes.Dockerfile.conf. 
  
 ===== Step 1) ===== ===== Step 1) =====
Line 13: Line 16:
 <file properties> <file properties>
 [Extensions] [Extensions]
-Dockerfile=Dockerfile;dockerfile;*.dockerfile;*.Dockerfile;docker*; +DockerCompose=docker-compose*.yml;docker-compose*.yaml;compose.yml;compose.yaml
-YAML= +
-YML=*.yaml;*.yml;+
  
 [Groups] [Groups]
-Script=Dockerfile; +Script=DockerCompose;
-Misc=YML;+
 </file> </file>
  
-(For the interested : it seems as the default YAML is a built-in, which cannot be removed.  The workaround is to introduce the YML file type and to set 'YAML=' which overrides the file mapping.  YAML file type will still be visible in the Menu, but matching of yaml files will be to YML file type.) 
  
 ===== Step 2) ===== ===== Step 2) =====
  
-Save the configuration file below in your Geany filetype definition files config directory, e.g. //~/.config/geany/filedefs/filetypes.Dockerfile.conf//+Save the configuration file below in your Geany filetype definition files config directory, e.g. //~/.config/geany/filedefs/filetypes.DockerCompose.conf//
  
-<file properties filetypes.Dockerfile.conf>+<file properties filetypes.DockerCompose.conf>
 # For complete documentation of this file, please see Geany's main documentation # For complete documentation of this file, please see Geany's main documentation
 # #
-# Geany Color Syntax support for Dockerfiles  +# Geany Color Syntax support for Docker-Compose files
-+
-# It can also parse docker-compose files,  +
-# but requires commenting out the YAML-row in the Geany installation filetype_extensions.conf  +
-#  +
-# version 0.3 +
-+
-# 0.1 - estadieu.pl@gmail.com   # original version +
-# 0.2 - axelsson.jan@gmail.com  # base on Sh instead - fixes problems with //, #, /*  +
-# 0.3 - axelsson.jan@gmail.com  # base on Python instead - folding of yml  +
-  +
-[styling] +
-default=default +
-commentline=comment_line +
-number=number_1 +
-string=string_1 +
-word=keyword_1+
  
-  +# Use the Python filetype as base for better highlighting of YAML keys according to defined keywords 
-[keywords] +[styling=Python]
-primary= ADD ARG CMD COPY ENTRYPOINT ENV EXPOSE FROM HEALTHCHECK LABEL ONBUILD RUN SHELL STOPSIGNAL USER VOLUME WORKDIR build container_name context command default depends_on dns dockerfile entrypoint environment env_file expose external extra_hosts external_links file hostname image labels links name network ports service services version volumes devices +
  
- +[lexer_properties=Python]
-[settings] +
-lexer_filetype=Python +
- +
-# single comments, like # in this file +
-comment_single=# +
- +
-# set to false if a comment character/string should start at column 0 of a line, true uses any +
-# indentation of the line, e.g. setting to true causes the following on pressing CTRL+d +
- #command_example(); +
-# setting to false would generate this +
-# command_example(); +
-# This setting works only for single line comments +
-comment_use_indent=false +
-# context action command (please see Geany's main documentation for details) +
-context_action_cmd=xdg-open "https://docs.docker.com/engine/reference/builder/" +
- +
-#wordchars=_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 +
- +
- +
-</file> +
- +
- +
-===== Step 3) ===== +
- +
-Save the configuration file below in your Geany filetype definition files config directory, e.g. //~/.config/geany/filedefs/filetypes.YML.conf// +
- +
-<file properties filetypes.YML.conf> +
-# For complete documentation of this file, please see Geany's main documentation +
-[styling] +
-# Edit these in the colorscheme .conf file instead +
-default=default +
-comment=comment +
-identifier=identifier +
-keyword=keyword_1 +
-number=number_1 +
-reference=function +
-document=preprocessor +
-text=string_1 +
-error=error +
-operator=operator+
  
 [keywords] [keywords]
-# all items must be in one line +primary=aliases annotations app_protocol args attach attachable aux_addresses blkio_config build cap_add cap_drop cgroup cgroup_parent command condition configs container_name content context cpu_count cpu_percent cpu_period cpu_quota cpu_rt_period cpu_rt_runtime cpu_shares cpus cpuset credential_spec default depends_on deploy develop device_cgroup_rules device_read_bps device_read_iop device_read_iops device_write_bps device_write_iops devices disable dns dns_opt dns_search dockerfile domainname drive driver_opts enable_ipv6 entrypoint env_file environment expose extends external external_links extra_hosts file gateway gid group_add hard healthcheck host_ip hostname image init internal interval ip_range ipam ipc ipv4_address ipv6_address isolation labels link_local_ips links logging mac_address mem_limit mem_reservation mem_swappiness memswap_limit mode name network network_mode networks nofile nproc oom_kill_disable oom_score_adj options path pid pids_limit platform ports priority privileged profiles protocol published pull_policy rate read_only required restart retries runtime scale secrets security_opt service services shm_size soft source start_interval start_period stdin_open stop_grace_period stop_signal storage_opt subnet sysctls target test timeout tmpfs tty type uid ulimits user userns_mode uts version volumes volumes_from weight weight_device working_dir 
-keywordstrue false yes no  +identifiers=false host ingress no null service_completed_successfully service_healthy service_started true yes
  
 [settings] [settings]
-lexer_filetype=YAML +lexer_filetype=Python
-# default extension used when saving files+
 extension=yaml extension=yaml
- 
-# MIME type 
 mime_type=application/x-yaml mime_type=application/x-yaml
- 
-# the following characters are these which a "word" can contains, see documentation 
-#wordchars=_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 
- 
-# single comments, like # in this file 
 comment_single=# comment_single=#
-# multiline comments 
-#comment_open= 
-#comment_close= 
  
-# set to false if a comment character/string should start at column 0 of a line, true uses any +context_action_cmd=xdg-open "https://docs.docker.com/compose/compose-file/"
-# indentation of the line, e.gsetting to true causes the following on pressing CTRL+d +
- #command_example(); +
-# setting to false would generate this +
-# command_example(); +
-# This setting works only for single line comments +
-comment_use_indent=true+
  
-# context action command (please see Geany's main documentation for details) +</file>
-context_action_cmd=+
  
-[indentation] 
-#width=4 
-# 0 is spaces, 1 is tabs, 2 is tab & spaces 
-#type=1 
- 
-</file> 
-(For the interested : this is a copy of the default filetypes.yaml) 
  
 +{{tag>configure gnuplot filetype Dockerfile docker-compose}}
  
-{{tag>configure gnuplot filetype Dockerfile}} 
Print/export