├── .gitignore
├── .gitlab-ci.yml
├── LICENSE
├── README.md
├── bin
├── dockertex.sh
└── dockertexstudio.sh
├── dockertex.plugin.zsh
├── dockertexstudio.plugin.zsh
├── install.sh
├── latex
├── debian-wheezy.Dockerfile
├── ge-jessie.Dockerfile
├── hooks
│ ├── build
│ ├── post_push
│ └── pre_build
├── scripts
│ ├── build.sh
│ └── tag_alias.sh
└── ubuntu-trusty.Dockerfile
├── misc
├── dockertexstudio.desktop
├── icons
│ └── hicolor
│ │ ├── 128x128
│ │ └── apps
│ │ │ └── texstudio.svg
│ │ ├── 16x16
│ │ └── apps
│ │ │ └── texstudio.svg
│ │ ├── 24x24
│ │ └── apps
│ │ │ └── texstudio.svg
│ │ ├── 32x32
│ │ └── apps
│ │ │ └── texstudio.svg
│ │ ├── 48x48
│ │ └── apps
│ │ │ └── texstudio.svg
│ │ ├── 64x64
│ │ └── apps
│ │ │ └── texstudio.svg
│ │ └── scalable
│ │ └── apps
│ │ └── texstudio.svg
└── pictures
│ └── gitlab_ci_artifacts.jpg
├── posthook.sh
└── texstudio
├── debian-jessie.Dockerfile
├── debian-wheezy.Dockerfile
├── env_file_all
├── ge-stretch.Dockerfile
├── hooks
├── build
└── post_push
├── scripts
├── build.sh
└── tag_alias.sh
├── ubuntu-trusty.Dockerfile
└── ubuntu-xenial.Dockerfile
/.gitignore:
--------------------------------------------------------------------------------
1 | ###vim###
2 |
3 | [._]*.s[a-w][a-z]
4 | [._]s[a-w][a-z]
5 | *.un~
6 | Session.vim
7 | .netrwhist
8 | *~
9 |
10 |
11 | ###NotepadPP###
12 |
13 | # Notepad++ backups #
14 | *.bak
15 |
16 |
17 | ###Linux###
18 |
19 | *~
20 |
21 | # KDE directory preferences
22 | .directory
23 |
24 |
25 | ###Windows###
26 |
27 | # Windows image file caches
28 | Thumbs.db
29 | ehthumbs.db
30 |
31 | # Folder config file
32 | Desktop.ini
33 |
34 | # Recycle Bin used on file shares
35 | $RECYCLE.BIN/
36 |
37 | # Windows Installer files
38 | *.cab
39 | *.msi
40 | *.msm
41 | *.msp
42 |
43 | # Windows shortcuts
44 | *.lnk
45 |
46 |
47 | ###SublimeText###
48 |
49 | # cache files for sublime text
50 | *.tmlanguage.cache
51 | *.tmPreferences.cache
52 | *.stTheme.cache
53 |
54 | # workspace files are user-specific
55 | *.sublime-workspace
56 |
57 | # project files should be checked into the repository, unless a significant
58 | # proportion of contributors will probably not be using SublimeText
59 | # *.sublime-project
60 |
61 | # sftp configuration file
62 | sftp-config.json
63 |
64 |
65 | ###Emacs###
66 |
67 | # -*- mode: gitignore; -*-
68 | *~
69 | \#*\#
70 | /.emacs.desktop
71 | /.emacs.desktop.lock
72 | *.elc
73 | auto-save-list
74 | tramp
75 | .\#*
76 |
77 | # Org-mode
78 | .org-id-locations
79 | *_archive
80 |
81 | # flymake-mode
82 | *_flymake.*
83 |
84 | # eshell files
85 | /eshell/history
86 | /eshell/lastdir
87 |
88 | # elpa packages
89 | /elpa/
90 |
91 | # reftex files
92 | *.rel
93 |
94 | # AUCTeX auto folder
95 | /auto/
96 |
97 |
98 | ###Kate###
99 |
100 | # Swap Files #
101 | .*.kate-swp
102 | .swp.*
--------------------------------------------------------------------------------
/.gitlab-ci.yml:
--------------------------------------------------------------------------------
1 | stages:
2 | - pre
3 | - latex
4 | - texstudio
5 | - post
6 |
7 | .docker_login:
8 | before_script:
9 | - test -z "$DOCKER_REGISTRY_PASSWORD" && echo "Provided empty password. Make sure DOCKER_REGISTRY_PASSWORD is set."
10 | - echo "$DOCKER_REGISTRY_PASSWORD" | docker login --username "$DOCKER_REGISTRY_USER" --password-stdin $DOCKER_REGISTRY_DOMAIN
11 | variables:
12 | DOCKER_REGISTRY_DOMAIN: docker.io
13 | DOCKER_REGISTRY_USER: raabf
14 |
15 | push_readme:
16 | extends: .docker_login
17 | stage: pre
18 | tags: ['DOCKER']
19 | needs: []
20 | script:
21 | - docker pushrm --provider=dockerhub --file="./README.md" $DOCKER_REGISTRY_DOMAIN/raabf/latex-versions
22 | - docker pushrm --provider=dockerhub --file="./README.md" $DOCKER_REGISTRY_DOMAIN/raabf/texstudio-versions
23 | - docker pushrm --provider=dockerhub --file="./README.md" $DOCKER_REGISTRY_DOMAIN/raabf/latex-versions-arm
24 | rules:
25 | - if: $CI_PIPELINE_SOURCE == "merge_request_event"
26 | when: never
27 | - if: $CI_PIPELINE_SOURCE == "schedule"
28 | when: never
29 | - if: '$CI_COMMIT_BRANCH == "master"'
30 | when: on_success
31 | - when: never
32 |
33 |
34 | pre_clean:
35 | stage: pre
36 | tags: ['DOCKER']
37 | script:
38 | - docker image prune --all --force
39 | rules:
40 | - if: $CI_PIPELINE_SOURCE == "merge_request_event"
41 | when: never
42 | - if: $CI_PIPELINE_SOURCE == "schedule"
43 | when: on_success
44 | - when: never
45 |
46 | post_clean:
47 | stage: post
48 | tags: ['DOCKER']
49 | script:
50 | - docker image prune --force
51 | rules:
52 | - if: $CI_PIPELINE_SOURCE == "merge_request_event"
53 | when: never
54 | - when: always
55 |
56 |
57 | #############################
58 | ### Base ###
59 | #############################
60 |
61 | .base-build:
62 | extends: .docker_login
63 | tags: ['DOCKER']
64 | variables:
65 | PUSH_ENABLED: 'false'
66 |
67 | .build-latex:
68 | extends: .base-build
69 | stage: latex
70 | script:
71 | - ./latex/scripts/build.sh
72 | - ./latex/scripts/tag_alias.sh
73 |
74 | variables:
75 | DOCKER_REGISTRY_REPO: raabf/latex-versions
76 | DOCKERFILE_PATH: ./latex/ge-jessie.Dockerfile
77 |
78 | rules:
79 | - if: $CI_PIPELINE_SOURCE == "merge_request_event"
80 | when: never
81 | - if: $CI_PIPELINE_SOURCE == "schedule"
82 | when: on_success
83 | - when: manual
84 |
85 |
86 | .build-texstudio:
87 | extends: .base-build
88 | stage: texstudio
89 | script:
90 | - ./texstudio/scripts/build.sh
91 | - ./texstudio/scripts/tag_alias.sh
92 | variables:
93 | DOCKER_REGISTRY_REPO: raabf/texstudio-versions
94 | DOCKERFILE_PATH: ./texstudio/ge-stretch.Dockerfile
95 | TEXSTUDIO_VERSION: "4.2.3"
96 |
97 | rules:
98 | - if: $CI_PIPELINE_SOURCE == "merge_request_event"
99 | when: never
100 | - if: $CI_PIPELINE_SOURCE == "schedule"
101 | when: on_success
102 | - when: on_success
103 |
104 | #############################
105 | ### Latex ###
106 | #############################
107 |
108 | l-stretch:
109 | extends: .build-latex
110 | variables:
111 | IMAGE_TAG: stretch
112 |
113 | l-bionic:
114 | extends: .build-latex
115 | variables:
116 | IMAGE_TAG: bionic
117 |
118 | l-buster:
119 | extends: .build-latex
120 | variables:
121 | IMAGE_TAG: buster
122 |
123 | l-focal:
124 | extends: .build-latex
125 | variables:
126 | IMAGE_TAG: focal
127 |
128 | l-bullseye:
129 | extends: .build-latex
130 | variables:
131 | IMAGE_TAG: bullseye
132 |
133 | l-jammy:
134 | extends: .build-latex
135 | variables:
136 | IMAGE_TAG: jammy
137 |
138 | l-bookworm:
139 | extends: .build-latex
140 | variables:
141 | IMAGE_TAG: bookworm
142 |
143 |
144 | #############################
145 | ### Texstudio ###
146 | #############################
147 |
148 | t-stretch:
149 | extends: .build-texstudio
150 | needs: [ 'l-stretch' ]
151 | variables:
152 | IMAGE_TAG: stretch
153 | TEXSTUDIO_VERSION: "3.1.2"
154 |
155 | t-bionic:
156 | extends: .build-texstudio
157 | needs: [ 'l-bionic' ]
158 | variables:
159 | IMAGE_TAG: bionic
160 |
161 | t-buster:
162 | extends: .build-texstudio
163 | needs: [ 'l-buster' ]
164 | variables:
165 | IMAGE_TAG: buster
166 |
167 | t-focal:
168 | extends: .build-texstudio
169 | needs: [ 'l-focal' ]
170 | variables:
171 | IMAGE_TAG: focal
172 |
173 | t-bullseye:
174 | extends: .build-texstudio
175 | needs: [ 'l-bullseye' ]
176 | variables:
177 | IMAGE_TAG: bullseye
178 |
179 | t-jammy:
180 | extends: .build-texstudio
181 | needs: [ 'l-jammy' ]
182 | variables:
183 | IMAGE_TAG: jammy
184 |
185 | t-bookworm:
186 | extends: .build-texstudio
187 | needs: [ 'l-bookworm' ]
188 | variables:
189 | IMAGE_TAG: bookworm
190 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast,
15 | the GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to
20 | your programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new
27 | free programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether
35 | gratis or for a fee, you must pass on to the recipients the same
36 | freedoms that you received. You must make sure that they, too, receive
37 | or can get the source code. And you must show them these terms so they
38 | know their rights.
39 |
40 | Developers that use the GNU GPL protect your rights with two steps:
41 | (1) assert copyright on the software, and (2) offer you this License
42 | giving you legal permission to copy, distribute and/or modify it.
43 |
44 | For the developers' and authors' protection, the GPL clearly explains
45 | that there is no warranty for this free software. For both users' and
46 | authors' sake, the GPL requires that modified versions be marked as
47 | changed, so that their problems will not be attributed erroneously to
48 | authors of previous versions.
49 |
50 | Some devices are designed to deny users access to install or run
51 | modified versions of the software inside them, although the manufacturer
52 | can do so. This is fundamentally incompatible with the aim of
53 | protecting users' freedom to change the software. The systematic
54 | pattern of such abuse occurs in the area of products for individuals to
55 | use, which is precisely where it is most unacceptable. Therefore, we
56 | have designed this version of the GPL to prohibit the practice for those
57 | products. If such problems arise substantially in other domains, we
58 | stand ready to extend this provision to those domains in future versions
59 | of the GPL, as needed to protect the freedom of users.
60 |
61 | Finally, every program is threatened constantly by software patents.
62 | States should not allow patents to restrict development and use of
63 | software on general-purpose computers, but in those that do, we wish to
64 | avoid the special danger that patents applied to a free program could
65 | make it effectively proprietary. To prevent this, the GPL assures that
66 | patents cannot be used to render the program non-free.
67 |
68 | The precise terms and conditions for copying, distribution and
69 | modification follow.
70 |
71 | TERMS AND CONDITIONS
72 |
73 | 0. Definitions.
74 |
75 | "This License" refers to version 3 of the GNU General Public License.
76 |
77 | "Copyright" also means copyright-like laws that apply to other kinds of
78 | works, such as semiconductor masks.
79 |
80 | "The Program" refers to any copyrightable work licensed under this
81 | License. Each licensee is addressed as "you". "Licensees" and
82 | "recipients" may be individuals or organizations.
83 |
84 | To "modify" a work means to copy from or adapt all or part of the work
85 | in a fashion requiring copyright permission, other than the making of an
86 | exact copy. The resulting work is called a "modified version" of the
87 | earlier work or a work "based on" the earlier work.
88 |
89 | A "covered work" means either the unmodified Program or a work based
90 | on the Program.
91 |
92 | To "propagate" a work means to do anything with it that, without
93 | permission, would make you directly or secondarily liable for
94 | infringement under applicable copyright law, except executing it on a
95 | computer or modifying a private copy. Propagation includes copying,
96 | distribution (with or without modification), making available to the
97 | public, and in some countries other activities as well.
98 |
99 | To "convey" a work means any kind of propagation that enables other
100 | parties to make or receive copies. Mere interaction with a user through
101 | a computer network, with no transfer of a copy, is not conveying.
102 |
103 | An interactive user interface displays "Appropriate Legal Notices"
104 | to the extent that it includes a convenient and prominently visible
105 | feature that (1) displays an appropriate copyright notice, and (2)
106 | tells the user that there is no warranty for the work (except to the
107 | extent that warranties are provided), that licensees may convey the
108 | work under this License, and how to view a copy of this License. If
109 | the interface presents a list of user commands or options, such as a
110 | menu, a prominent item in the list meets this criterion.
111 |
112 | 1. Source Code.
113 |
114 | The "source code" for a work means the preferred form of the work
115 | for making modifications to it. "Object code" means any non-source
116 | form of a work.
117 |
118 | A "Standard Interface" means an interface that either is an official
119 | standard defined by a recognized standards body, or, in the case of
120 | interfaces specified for a particular programming language, one that
121 | is widely used among developers working in that language.
122 |
123 | The "System Libraries" of an executable work include anything, other
124 | than the work as a whole, that (a) is included in the normal form of
125 | packaging a Major Component, but which is not part of that Major
126 | Component, and (b) serves only to enable use of the work with that
127 | Major Component, or to implement a Standard Interface for which an
128 | implementation is available to the public in source code form. A
129 | "Major Component", in this context, means a major essential component
130 | (kernel, window system, and so on) of the specific operating system
131 | (if any) on which the executable work runs, or a compiler used to
132 | produce the work, or an object code interpreter used to run it.
133 |
134 | The "Corresponding Source" for a work in object code form means all
135 | the source code needed to generate, install, and (for an executable
136 | work) run the object code and to modify the work, including scripts to
137 | control those activities. However, it does not include the work's
138 | System Libraries, or general-purpose tools or generally available free
139 | programs which are used unmodified in performing those activities but
140 | which are not part of the work. For example, Corresponding Source
141 | includes interface definition files associated with source files for
142 | the work, and the source code for shared libraries and dynamically
143 | linked subprograms that the work is specifically designed to require,
144 | such as by intimate data communication or control flow between those
145 | subprograms and other parts of the work.
146 |
147 | The Corresponding Source need not include anything that users
148 | can regenerate automatically from other parts of the Corresponding
149 | Source.
150 |
151 | The Corresponding Source for a work in source code form is that
152 | same work.
153 |
154 | 2. Basic Permissions.
155 |
156 | All rights granted under this License are granted for the term of
157 | copyright on the Program, and are irrevocable provided the stated
158 | conditions are met. This License explicitly affirms your unlimited
159 | permission to run the unmodified Program. The output from running a
160 | covered work is covered by this License only if the output, given its
161 | content, constitutes a covered work. This License acknowledges your
162 | rights of fair use or other equivalent, as provided by copyright law.
163 |
164 | You may make, run and propagate covered works that you do not
165 | convey, without conditions so long as your license otherwise remains
166 | in force. You may convey covered works to others for the sole purpose
167 | of having them make modifications exclusively for you, or provide you
168 | with facilities for running those works, provided that you comply with
169 | the terms of this License in conveying all material for which you do
170 | not control copyright. Those thus making or running the covered works
171 | for you must do so exclusively on your behalf, under your direction
172 | and control, on terms that prohibit them from making any copies of
173 | your copyrighted material outside their relationship with you.
174 |
175 | Conveying under any other circumstances is permitted solely under
176 | the conditions stated below. Sublicensing is not allowed; section 10
177 | makes it unnecessary.
178 |
179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180 |
181 | No covered work shall be deemed part of an effective technological
182 | measure under any applicable law fulfilling obligations under article
183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184 | similar laws prohibiting or restricting circumvention of such
185 | measures.
186 |
187 | When you convey a covered work, you waive any legal power to forbid
188 | circumvention of technological measures to the extent such circumvention
189 | is effected by exercising rights under this License with respect to
190 | the covered work, and you disclaim any intention to limit operation or
191 | modification of the work as a means of enforcing, against the work's
192 | users, your or third parties' legal rights to forbid circumvention of
193 | technological measures.
194 |
195 | 4. Conveying Verbatim Copies.
196 |
197 | You may convey verbatim copies of the Program's source code as you
198 | receive it, in any medium, provided that you conspicuously and
199 | appropriately publish on each copy an appropriate copyright notice;
200 | keep intact all notices stating that this License and any
201 | non-permissive terms added in accord with section 7 apply to the code;
202 | keep intact all notices of the absence of any warranty; and give all
203 | recipients a copy of this License along with the Program.
204 |
205 | You may charge any price or no price for each copy that you convey,
206 | and you may offer support or warranty protection for a fee.
207 |
208 | 5. Conveying Modified Source Versions.
209 |
210 | You may convey a work based on the Program, or the modifications to
211 | produce it from the Program, in the form of source code under the
212 | terms of section 4, provided that you also meet all of these conditions:
213 |
214 | a) The work must carry prominent notices stating that you modified
215 | it, and giving a relevant date.
216 |
217 | b) The work must carry prominent notices stating that it is
218 | released under this License and any conditions added under section
219 | 7. This requirement modifies the requirement in section 4 to
220 | "keep intact all notices".
221 |
222 | c) You must license the entire work, as a whole, under this
223 | License to anyone who comes into possession of a copy. This
224 | License will therefore apply, along with any applicable section 7
225 | additional terms, to the whole of the work, and all its parts,
226 | regardless of how they are packaged. This License gives no
227 | permission to license the work in any other way, but it does not
228 | invalidate such permission if you have separately received it.
229 |
230 | d) If the work has interactive user interfaces, each must display
231 | Appropriate Legal Notices; however, if the Program has interactive
232 | interfaces that do not display Appropriate Legal Notices, your
233 | work need not make them do so.
234 |
235 | A compilation of a covered work with other separate and independent
236 | works, which are not by their nature extensions of the covered work,
237 | and which are not combined with it such as to form a larger program,
238 | in or on a volume of a storage or distribution medium, is called an
239 | "aggregate" if the compilation and its resulting copyright are not
240 | used to limit the access or legal rights of the compilation's users
241 | beyond what the individual works permit. Inclusion of a covered work
242 | in an aggregate does not cause this License to apply to the other
243 | parts of the aggregate.
244 |
245 | 6. Conveying Non-Source Forms.
246 |
247 | You may convey a covered work in object code form under the terms
248 | of sections 4 and 5, provided that you also convey the
249 | machine-readable Corresponding Source under the terms of this License,
250 | in one of these ways:
251 |
252 | a) Convey the object code in, or embodied in, a physical product
253 | (including a physical distribution medium), accompanied by the
254 | Corresponding Source fixed on a durable physical medium
255 | customarily used for software interchange.
256 |
257 | b) Convey the object code in, or embodied in, a physical product
258 | (including a physical distribution medium), accompanied by a
259 | written offer, valid for at least three years and valid for as
260 | long as you offer spare parts or customer support for that product
261 | model, to give anyone who possesses the object code either (1) a
262 | copy of the Corresponding Source for all the software in the
263 | product that is covered by this License, on a durable physical
264 | medium customarily used for software interchange, for a price no
265 | more than your reasonable cost of physically performing this
266 | conveying of source, or (2) access to copy the
267 | Corresponding Source from a network server at no charge.
268 |
269 | c) Convey individual copies of the object code with a copy of the
270 | written offer to provide the Corresponding Source. This
271 | alternative is allowed only occasionally and noncommercially, and
272 | only if you received the object code with such an offer, in accord
273 | with subsection 6b.
274 |
275 | d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 |
288 | e) Convey the object code using peer-to-peer transmission, provided
289 | you inform other peers where the object code and Corresponding
290 | Source of the work are being offered to the general public at no
291 | charge under subsection 6d.
292 |
293 | A separable portion of the object code, whose source code is excluded
294 | from the Corresponding Source as a System Library, need not be
295 | included in conveying the object code work.
296 |
297 | A "User Product" is either (1) a "consumer product", which means any
298 | tangible personal property which is normally used for personal, family,
299 | or household purposes, or (2) anything designed or sold for incorporation
300 | into a dwelling. In determining whether a product is a consumer product,
301 | doubtful cases shall be resolved in favor of coverage. For a particular
302 | product received by a particular user, "normally used" refers to a
303 | typical or common use of that class of product, regardless of the status
304 | of the particular user or of the way in which the particular user
305 | actually uses, or expects or is expected to use, the product. A product
306 | is a consumer product regardless of whether the product has substantial
307 | commercial, industrial or non-consumer uses, unless such uses represent
308 | the only significant mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to install
312 | and execute modified versions of a covered work in that User Product from
313 | a modified version of its Corresponding Source. The information must
314 | suffice to ensure that the continued functioning of the modified object
315 | code is in no case prevented or interfered with solely because
316 | modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or updates
331 | for a work that has been modified or installed by the recipient, or for
332 | the User Product in which it has been modified or installed. Access to a
333 | network may be denied when the modification itself materially and
334 | adversely affects the operation of the network or violates the rules and
335 | protocols for communication across the network.
336 |
337 | Corresponding Source conveyed, and Installation Information provided,
338 | in accord with this section must be in a format that is publicly
339 | documented (and with an implementation available to the public in
340 | source code form), and must require no special password or key for
341 | unpacking, reading or copying.
342 |
343 | 7. Additional Terms.
344 |
345 | "Additional permissions" are terms that supplement the terms of this
346 | License by making exceptions from one or more of its conditions.
347 | Additional permissions that are applicable to the entire Program shall
348 | be treated as though they were included in this License, to the extent
349 | that they are valid under applicable law. If additional permissions
350 | apply only to part of the Program, that part may be used separately
351 | under those permissions, but the entire Program remains governed by
352 | this License without regard to the additional permissions.
353 |
354 | When you convey a copy of a covered work, you may at your option
355 | remove any additional permissions from that copy, or from any part of
356 | it. (Additional permissions may be written to require their own
357 | removal in certain cases when you modify the work.) You may place
358 | additional permissions on material, added by you to a covered work,
359 | for which you have or can give appropriate copyright permission.
360 |
361 | Notwithstanding any other provision of this License, for material you
362 | add to a covered work, you may (if authorized by the copyright holders of
363 | that material) supplement the terms of this License with terms:
364 |
365 | a) Disclaiming warranty or limiting liability differently from the
366 | terms of sections 15 and 16 of this License; or
367 |
368 | b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 |
372 | c) Prohibiting misrepresentation of the origin of that material, or
373 | requiring that modified versions of such material be marked in
374 | reasonable ways as different from the original version; or
375 |
376 | d) Limiting the use for publicity purposes of names of licensors or
377 | authors of the material; or
378 |
379 | e) Declining to grant rights under trademark law for use of some
380 | trade names, trademarks, or service marks; or
381 |
382 | f) Requiring indemnification of licensors and authors of that
383 | material by anyone who conveys the material (or modified versions of
384 | it) with contractual assumptions of liability to the recipient, for
385 | any liability that these contractual assumptions directly impose on
386 | those licensors and authors.
387 |
388 | All other non-permissive additional terms are considered "further
389 | restrictions" within the meaning of section 10. If the Program as you
390 | received it, or any part of it, contains a notice stating that it is
391 | governed by this License along with a term that is a further
392 | restriction, you may remove that term. If a license document contains
393 | a further restriction but permits relicensing or conveying under this
394 | License, you may add to a covered work material governed by the terms
395 | of that license document, provided that the further restriction does
396 | not survive such relicensing or conveying.
397 |
398 | If you add terms to a covered work in accord with this section, you
399 | must place, in the relevant source files, a statement of the
400 | additional terms that apply to those files, or a notice indicating
401 | where to find the applicable terms.
402 |
403 | Additional terms, permissive or non-permissive, may be stated in the
404 | form of a separately written license, or stated as exceptions;
405 | the above requirements apply either way.
406 |
407 | 8. Termination.
408 |
409 | You may not propagate or modify a covered work except as expressly
410 | provided under this License. Any attempt otherwise to propagate or
411 | modify it is void, and will automatically terminate your rights under
412 | this License (including any patent licenses granted under the third
413 | paragraph of section 11).
414 |
415 | However, if you cease all violation of this License, then your
416 | license from a particular copyright holder is reinstated (a)
417 | provisionally, unless and until the copyright holder explicitly and
418 | finally terminates your license, and (b) permanently, if the copyright
419 | holder fails to notify you of the violation by some reasonable means
420 | prior to 60 days after the cessation.
421 |
422 | Moreover, your license from a particular copyright holder is
423 | reinstated permanently if the copyright holder notifies you of the
424 | violation by some reasonable means, this is the first time you have
425 | received notice of violation of this License (for any work) from that
426 | copyright holder, and you cure the violation prior to 30 days after
427 | your receipt of the notice.
428 |
429 | Termination of your rights under this section does not terminate the
430 | licenses of parties who have received copies or rights from you under
431 | this License. If your rights have been terminated and not permanently
432 | reinstated, you do not qualify to receive new licenses for the same
433 | material under section 10.
434 |
435 | 9. Acceptance Not Required for Having Copies.
436 |
437 | You are not required to accept this License in order to receive or
438 | run a copy of the Program. Ancillary propagation of a covered work
439 | occurring solely as a consequence of using peer-to-peer transmission
440 | to receive a copy likewise does not require acceptance. However,
441 | nothing other than this License grants you permission to propagate or
442 | modify any covered work. These actions infringe copyright if you do
443 | not accept this License. Therefore, by modifying or propagating a
444 | covered work, you indicate your acceptance of this License to do so.
445 |
446 | 10. Automatic Licensing of Downstream Recipients.
447 |
448 | Each time you convey a covered work, the recipient automatically
449 | receives a license from the original licensors, to run, modify and
450 | propagate that work, subject to this License. You are not responsible
451 | for enforcing compliance by third parties with this License.
452 |
453 | An "entity transaction" is a transaction transferring control of an
454 | organization, or substantially all assets of one, or subdividing an
455 | organization, or merging organizations. If propagation of a covered
456 | work results from an entity transaction, each party to that
457 | transaction who receives a copy of the work also receives whatever
458 | licenses to the work the party's predecessor in interest had or could
459 | give under the previous paragraph, plus a right to possession of the
460 | Corresponding Source of the work from the predecessor in interest, if
461 | the predecessor has it or can get it with reasonable efforts.
462 |
463 | You may not impose any further restrictions on the exercise of the
464 | rights granted or affirmed under this License. For example, you may
465 | not impose a license fee, royalty, or other charge for exercise of
466 | rights granted under this License, and you may not initiate litigation
467 | (including a cross-claim or counterclaim in a lawsuit) alleging that
468 | any patent claim is infringed by making, using, selling, offering for
469 | sale, or importing the Program or any portion of it.
470 |
471 | 11. Patents.
472 |
473 | A "contributor" is a copyright holder who authorizes use under this
474 | License of the Program or a work on which the Program is based. The
475 | work thus licensed is called the contributor's "contributor version".
476 |
477 | A contributor's "essential patent claims" are all patent claims
478 | owned or controlled by the contributor, whether already acquired or
479 | hereafter acquired, that would be infringed by some manner, permitted
480 | by this License, of making, using, or selling its contributor version,
481 | but do not include claims that would be infringed only as a
482 | consequence of further modification of the contributor version. For
483 | purposes of this definition, "control" includes the right to grant
484 | patent sublicenses in a manner consistent with the requirements of
485 | this License.
486 |
487 | Each contributor grants you a non-exclusive, worldwide, royalty-free
488 | patent license under the contributor's essential patent claims, to
489 | make, use, sell, offer for sale, import and otherwise run, modify and
490 | propagate the contents of its contributor version.
491 |
492 | In the following three paragraphs, a "patent license" is any express
493 | agreement or commitment, however denominated, not to enforce a patent
494 | (such as an express permission to practice a patent or covenant not to
495 | sue for patent infringement). To "grant" such a patent license to a
496 | party means to make such an agreement or commitment not to enforce a
497 | patent against the party.
498 |
499 | If you convey a covered work, knowingly relying on a patent license,
500 | and the Corresponding Source of the work is not available for anyone
501 | to copy, free of charge and under the terms of this License, through a
502 | publicly available network server or other readily accessible means,
503 | then you must either (1) cause the Corresponding Source to be so
504 | available, or (2) arrange to deprive yourself of the benefit of the
505 | patent license for this particular work, or (3) arrange, in a manner
506 | consistent with the requirements of this License, to extend the patent
507 | license to downstream recipients. "Knowingly relying" means you have
508 | actual knowledge that, but for the patent license, your conveying the
509 | covered work in a country, or your recipient's use of the covered work
510 | in a country, would infringe one or more identifiable patents in that
511 | country that you have reason to believe are valid.
512 |
513 | If, pursuant to or in connection with a single transaction or
514 | arrangement, you convey, or propagate by procuring conveyance of, a
515 | covered work, and grant a patent license to some of the parties
516 | receiving the covered work authorizing them to use, propagate, modify
517 | or convey a specific copy of the covered work, then the patent license
518 | you grant is automatically extended to all recipients of the covered
519 | work and works based on it.
520 |
521 | A patent license is "discriminatory" if it does not include within
522 | the scope of its coverage, prohibits the exercise of, or is
523 | conditioned on the non-exercise of one or more of the rights that are
524 | specifically granted under this License. You may not convey a covered
525 | work if you are a party to an arrangement with a third party that is
526 | in the business of distributing software, under which you make payment
527 | to the third party based on the extent of your activity of conveying
528 | the work, and under which the third party grants, to any of the
529 | parties who would receive the covered work from you, a discriminatory
530 | patent license (a) in connection with copies of the covered work
531 | conveyed by you (or copies made from those copies), or (b) primarily
532 | for and in connection with specific products or compilations that
533 | contain the covered work, unless you entered into that arrangement,
534 | or that patent license was granted, prior to 28 March 2007.
535 |
536 | Nothing in this License shall be construed as excluding or limiting
537 | any implied license or other defenses to infringement that may
538 | otherwise be available to you under applicable patent law.
539 |
540 | 12. No Surrender of Others' Freedom.
541 |
542 | If conditions are imposed on you (whether by court order, agreement or
543 | otherwise) that contradict the conditions of this License, they do not
544 | excuse you from the conditions of this License. If you cannot convey a
545 | covered work so as to satisfy simultaneously your obligations under this
546 | License and any other pertinent obligations, then as a consequence you may
547 | not convey it at all. For example, if you agree to terms that obligate you
548 | to collect a royalty for further conveying from those to whom you convey
549 | the Program, the only way you could satisfy both those terms and this
550 | License would be to refrain entirely from conveying the Program.
551 |
552 | 13. Use with the GNU Affero General Public License.
553 |
554 | Notwithstanding any other provision of this License, you have
555 | permission to link or combine any covered work with a work licensed
556 | under version 3 of the GNU Affero General Public License into a single
557 | combined work, and to convey the resulting work. The terms of this
558 | License will continue to apply to the part which is the covered work,
559 | but the special requirements of the GNU Affero General Public License,
560 | section 13, concerning interaction through a network will apply to the
561 | combination as such.
562 |
563 | 14. Revised Versions of this License.
564 |
565 | The Free Software Foundation may publish revised and/or new versions of
566 | the GNU General Public License from time to time. Such new versions will
567 | be similar in spirit to the present version, but may differ in detail to
568 | address new problems or concerns.
569 |
570 | Each version is given a distinguishing version number. If the
571 | Program specifies that a certain numbered version of the GNU General
572 | Public License "or any later version" applies to it, you have the
573 | option of following the terms and conditions either of that numbered
574 | version or of any later version published by the Free Software
575 | Foundation. If the Program does not specify a version number of the
576 | GNU General Public License, you may choose any version ever published
577 | by the Free Software Foundation.
578 |
579 | If the Program specifies that a proxy can decide which future
580 | versions of the GNU General Public License can be used, that proxy's
581 | public statement of acceptance of a version permanently authorizes you
582 | to choose that version for the Program.
583 |
584 | Later license versions may give you additional or different
585 | permissions. However, no additional obligations are imposed on any
586 | author or copyright holder as a result of your choosing to follow a
587 | later version.
588 |
589 | 15. Disclaimer of Warranty.
590 |
591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599 |
600 | 16. Limitation of Liability.
601 |
602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610 | SUCH DAMAGES.
611 |
612 | 17. Interpretation of Sections 15 and 16.
613 |
614 | If the disclaimer of warranty and limitation of liability provided
615 | above cannot be given local legal effect according to their terms,
616 | reviewing courts shall apply local law that most closely approximates
617 | an absolute waiver of all civil liability in connection with the
618 | Program, unless a warranty or assumption of liability accompanies a
619 | copy of the Program in return for a fee.
620 |
621 | END OF TERMS AND CONDITIONS
622 |
623 | How to Apply These Terms to Your New Programs
624 |
625 | If you develop a new program, and you want it to be of the greatest
626 | possible use to the public, the best way to achieve this is to make it
627 | free software which everyone can redistribute and change under these terms.
628 |
629 | To do so, attach the following notices to the program. It is safest
630 | to attach them to the start of each source file to most effectively
631 | state the exclusion of warranty; and each file should have at least
632 | the "copyright" line and a pointer to where the full notice is found.
633 |
634 | dockertex
635 | Copyright (C) 2017 Fabian Raab
636 |
637 | This program is free software: you can redistribute it and/or modify
638 | it under the terms of the GNU General Public License as published by
639 | the Free Software Foundation, either version 3 of the License, or
640 | (at your option) any later version.
641 |
642 | This program is distributed in the hope that it will be useful,
643 | but WITHOUT ANY WARRANTY; without even the implied warranty of
644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 | GNU General Public License for more details.
646 |
647 | You should have received a copy of the GNU General Public License
648 | along with this program. If not, see .
649 |
650 | Also add information on how to contact you by electronic and paper mail.
651 |
652 | If the program does terminal interaction, make it output a short
653 | notice like this when it starts in an interactive mode:
654 |
655 | dockertex Copyright (C) 2017 Fabian Raab
656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 | This is free software, and you are welcome to redistribute it
658 | under certain conditions; type `show c' for details.
659 |
660 | The hypothetical commands `show w' and `show c' should show the appropriate
661 | parts of the General Public License. Of course, your program's commands
662 | might be different; for a GUI interface, you would use an "about box".
663 |
664 | You should also get your employer (if you work as a programmer) or school,
665 | if any, to sign a "copyright disclaimer" for the program, if necessary.
666 | For more information on this, and how to apply and follow the GNU GPL, see
667 | .
668 |
669 | The GNU General Public License does not permit incorporating your program
670 | into proprietary programs. If your program is a subroutine library, you
671 | may consider it more useful to permit linking proprietary applications with
672 | the library. If this is what you want to do, use the GNU Lesser General
673 | Public License instead of this License. But first, please read
674 | .
675 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | 🐋📓 DockerTeX ➕ 🐋📽 DockerTeXstudio
2 | =====================================
3 |
4 | [](https://gitlab.com/raabf/dockertex/-/pipeline_schedules)
5 | [](https://gitlab.com/raabf/dockertex/-/commits/master)
6 | [](https://gitlab.com/raabf/dockertex/-/pipelines/master/latest)
7 | [](https://gitlab.com/raabf/dockertex/blob/master/LICENSE)
8 |
9 |
10 | #### 🏬 Dockerhub:
11 |
12 | | 📓[raabf/latex-versions](https://hub.docker.com/r/raabf/latex-versions) | 📱[raabf/latex-versions-arm](https://hub.docker.com/r/raabf/latex-versions-arm)🆕 | 📽[raabf/texstudio-versions](https://hub.docker.com/r/raabf/texstudio-versions)|
13 | |---------------|---------------|---------------|
14 | |   |   |   |
15 |
16 | Both images are automatically rebuilt on Dockerhub when the Debian or Ubuntu base images change (they do on average each once per month).
17 |
18 | 📵 ARM variants: Docker does not provide free builds on dockerhub any more, so I need an new infrastructure and hence the ARM variants are currently not building.
19 |
20 | ## 📑️ Table of Contents
21 |
22 |
23 | + [🏆 Features](#-features)
24 | + [🏷 Supported tags](#-supported-tags)
25 | + [🖱 Usage](#-usage)
26 | - [📓 dockertex](#-dockertex)
27 | - [📽 dockertexstudio](#-dockertexstudio)
28 | + [🪠 TexStudio Display Troubleshooting](#-texstudio-display-troubleshooting)
29 | + [🛠 Installation](#-installation)
30 | - [👔 zsh plugin manager](#-zsh-plugin-manager)
31 | * [zplug](#zplug)
32 | - [⛓ Automated script](#-automated-script)
33 | - [🔨 Manual](#-manual)
34 | + [🎈 Continuous Integration \(CI\)](#-continuous-integration-ci)
35 | - [GitLab CI](#gitlab-ci)
36 | + [💡 Contributing](#-contributing)
37 |
38 |
39 |
40 | ## 🏆 Features
41 |
42 | + 💯 The only latex docker which provides different texlive versions — all from 2012 onwards!
43 | + 🐧 Uses Linux Debian and Ubuntu as backend.
44 | + 🏙 Complete latex package (texlive-full), which includes every latex module you normally need.
45 | + 📽 [TeXstudio](https://www.texstudio.org/) GUI can be started in all containers.
46 | + 🏭 Common tools used with latex are pre-installed: biber, make, gnuplot, inkscape, pandoc, python-pygments.
47 | + ⬛ Easy and short shell commands to build your document in the docker container (see “Usage” section).
48 | + 🎎 Preserves your ownership (user and group ID) of all your files which get pushed or created by the docker container.
49 | + 👷 Easy installation via script or shell plugin-manager.
50 | + 🗃 Menu entries for TeXstudio of all installed texlive versions.
51 | + 🖥 The TexStudio GUI runs directly on your local X-server via shared sockets (no ssh X-forwarding or something like that). Please see [Troubleshooting](#-texstudio-display-troubleshooting) on problems.
52 | + 📍 The TexStudio’s “Go to PDF” and ‘’Go to Source Code” are working as well as the [LanguageTool](https://languagetool.org/) integration.
53 | + 🦫 Supports also [Podman](https://podman.io/) instead of docker CLI.
54 |
55 |
56 | ## 🏷 Supported tags
57 |
58 | To specify your texlive version you can either use the texlive tag (texlive2012, texlive2013, …) or use the distribution codenames (wheezy, trusty, …)
59 |
60 | | 📓texlive | 🏷docker-tag | 📀distro | 🏷docker-tag | 🐳Dockerfile and info for 📓Latex, 📱Latex-ARM,and 📽TeXstudio | 📋Notes |
61 | |----------:|:------------|--------:|:------------|:-----------------|:--------------------------------------|
62 | | v2012 | texlive2012 | Debian | wheezy | [](https://gitlab.com/raabf/dockertex/blob/master/latex/debian-wheezy.Dockerfile "Latex Dockerfile") [](https://gitlab.com/raabf/dockertex/blob/master/texstudio/debian-wheezy.Dockerfile "TeXstudio Dockerfile") | EOL²; last TeXstudio¹: 2.12.10-2 |
63 | | v2013 | texlive2013 | Ubuntu | trusty | [](https://gitlab.com/raabf/dockertex/blob/master/latex/ubuntu-trusty.Dockerfile "Latex Dockerfile") [](https://gitlab.com/raabf/dockertex/blob/master/texstudio/ubuntu-trusty.Dockerfile "TeXstudio Dockerfile") | EOL²; last TeXstudio¹: 2.12.14-1 |
64 | | v2014 | texlive2014 armhf-texlive2014 | Debian | jessie armhf-jessie | [](https://gitlab.com/raabf/dockertex/blob/master/latex/ge-jessie.Dockerfile "Latex Dockerfile") [](https://gitlab.com/raabf/dockertex/blob/master/texstudio/debian-jessie.Dockerfile "TeXstudio Dockerfile") | EOL²; last TeXstudio¹: 2.12.14-1 |
65 | | v2015 | texlive2015 armhf-texlive2015 arm64-texlive2015 | Ubuntu | xenial armhf-xenial arm64-xenial | [](https://gitlab.com/raabf/dockertex/blob/master/latex/ge-jessie.Dockerfile "Latex Dockerfile") [](https://gitlab.com/raabf/dockertex/blob/master/texstudio/ubuntu-xenial.Dockerfile "TeXstudio Dockerfile") | EOL²; last TeXstudio¹: 2.12.22-1 |
66 | | v2016 | texlive2016 armhf-texlive2016 arm64-texlive2016 | Debian | stretch armhf-stretch arm64-stretch | [](https://gitlab.com/raabf/dockertex/blob/master/latex/ge-jessie.Dockerfile "Latex Dockerfile") [](https://gitlab.com/raabf/dockertex/-/blob/master/texstudio/ge-stretch.Dockerfile "TeXstudio Dockerfile") |   last TeXstudio¹: 3.1.2 |
67 | | v2017 | texlive2017 armhf-texlive2017 arm64-texlive2017 | Ubuntu | bionic armhf-bionic arm64-bionic | [](https://gitlab.com/raabf/dockertex/blob/master/latex/ge-jessie.Dockerfile "Latex Dockerfile") [](https://gitlab.com/raabf/dockertex/-/blob/master/texstudio/ge-stretch.Dockerfile "TeXstudio Dockerfile") | |
68 | | v2018 | texlive2018 armhf-texlive2018 arm64-texlive2018 | Debian | buster armhf-buster arm64-buster | [](https://gitlab.com/raabf/dockertex/blob/master/latex/ge-jessie.Dockerfile "Latex Dockerfile") [](https://gitlab.com/raabf/dockertex/-/blob/master/texstudio/ge-stretch.Dockerfile "TeXstudio Dockerfile") | |
69 | | v2019 | texlive2019 armhf-texlive2019 arm64-texlive2019 | Ubuntu | focal armhf-focal arm64-focal | [](https://gitlab.com/raabf/dockertex/blob/master/latex/ge-jessie.Dockerfile "Latex Dockerfile") [](https://gitlab.com/raabf/dockertex/-/blob/master/texstudio/ge-stretch.Dockerfile "TeXstudio Dockerfile") | |
70 | | v2020 | texlive2020 | Debian | bullseye | [](https://gitlab.com/raabf/dockertex/blob/master/latex/ge-jessie.Dockerfile "Latex Dockerfile") [](https://gitlab.com/raabf/dockertex/-/blob/master/texstudio/ge-stretch.Dockerfile "TeXstudio Dockerfile") | |
71 | | v2021 | texlive2021 | Ubuntu | jammy | [](https://gitlab.com/raabf/dockertex/blob/master/latex/ge-jessie.Dockerfile "Latex Dockerfile") [](https://gitlab.com/raabf/dockertex/-/blob/master/texstudio/ge-stretch.Dockerfile "TeXstudio Dockerfile") |  |
72 | | v2022 | texlive2022 | Debian | bookworm | [](https://gitlab.com/raabf/dockertex/blob/master/latex/ge-jessie.Dockerfile "Latex Dockerfile") [](https://gitlab.com/raabf/dockertex/-/blob/master/texstudio/ge-stretch.Dockerfile "TeXstudio Dockerfile") |  in development |
73 |
74 | ¹ TeXstudio does not provide builds for this Linux distribution version any more. The container is build with the last available TeXstudio version.
75 |
76 | ² The distribution release reached End Of Life, so there aren’t any updates any more. However, the docker image should still work.
77 |
78 |
79 |
80 | ## 🖱 Usage
81 |
82 | Either [docker CLI](https://docs.docker.com/engine/reference/run/) or [Podman](https://podman.io/) are required to run the container.
83 | You can either use the dockertexstudio images or – if you never need TeXstudio – just the dockertex images. The dockertexstudio images include all features of the dockertex images. `dockertex` will automatically use the dockertexstudio images when installed on the local system, so that not twice as much disk space is occupied on your computer.
84 | `dockertex` and `dockertexstudio` will promt you to pull the docker images when necessary.
85 |
86 | **Fonts** The images contain debian’s non-free repository and ubuntu’s multiverse. Beside the default latex fonts, Liberation and MSCoreFonts are installed. Liberation are a free replacement for the MSCoreFonts. If you still use the MSCoreFonts you accept their [EULA](http://corefonts.sourceforge.net/eula.htm).
87 |
88 |
89 | ### 📓 dockertex
90 |
91 | Let's assume you are in a direcory with your latex file called `document.tex`, then for example just run:
92 |
93 | dockertex --tag texlive2016 pdftex document.tex
94 |
95 |
96 | The general syntax is:
97 |
98 | dockertex [-t|--tag tagname] command
99 |
100 |
101 | `dockertex` run the docker container with the tag `tagname` and mounts the current working directory `pwd` as a volume and just executes `command` in this mount point. Furthermore, the script makes sure that all files (changed and newly generated files) preserve their ownership (user and group ID) of the user executing `dockertex`.
102 |
103 | `command` can be arbitrary and is not limit to tex commands, for example if you use a `Makefile`:
104 |
105 | dockertex --tag jessie make all
106 |
107 |
108 | **Default Tag** To set a default Tag so that `--tag` is optional, set the environment variable:
109 |
110 | export DOCKERTEX_DEFAULT_TAG="texlive2016"
111 |
112 | **Engine** To run the container, select an executable within your PATH. It defaults to `podman` when it is installed, else `docker`. Specify it with:
113 |
114 | export DOCKERTEX_ENGINE="podman"
115 | export DOCKERTEX_ENGINE="docker"
116 |
117 | ### 📽 dockertexstudio
118 |
119 | `dockertexstudio` is a tool to start [TexStudio](https://www.texstudio.org/) GUI inside a specified docker container. The usage of the tag is the same as `dockertex`:
120 |
121 | dockertexstudio [-t|--tag tagname] [-v|--volume mapping]* [texstudio options]
122 |
123 |
124 | `dockertexstudio` always mounts your home directory `~` as volume in the container. If you need additional mount points, use `--volume`, which has the same syntax as in `docker run`. For example:
125 |
126 | dockertexstudio --tag texlive2016 --volume /media/git/:/home/git/
127 |
128 |
129 | The configuration of TexStudio in the containers and among the containers is preserved between runs of the docker containers. Execute `dockertexstudio --help` to display the local path of the configuration folder.
130 |
131 | **Menu Entries** The menu entries generated during the Installation process will also make use of `dockertexstudio`. In your file manager, you can even open `.tex` files directly with TexStudio inside the container. Just assign `.tex` files to the appropriate menu entry. But be careful, direct opening only works if the full file path inside and outside the container, is the same — this is the case for the per default mounted home directory.
132 |
133 | **Go to** Because TeXstudio is running inside the docker container, the “Go to PDF” and ‘’Go to Source Code” functions via synctex are working.
134 |
135 | **LanguageTool** [LanguageTool](https://languagetool.org/) is an advanced tool for grammar checking. It can be accessed via its HTTP API. `dockertexstudio` shares its network interface with the host system, so you can lunch LanguageTool on your host’s localhost interface (which is the default configuration for LanguageTool, so just start it normally) and `dockertexstudio` will be able to access it.
136 |
137 | **x11docker** The image basically also works with [`x11docker`](https://github.com/mviereck/x11docker), just call for example
138 |
139 | x11docker --network=host --share $HOME raabf/texstudio-versions:texlive2019
140 |
141 | You might want that because of its security features, or because it works better for you.
142 |
143 | ## 🪠 TexStudio Display Troubleshooting
144 |
145 | ### Authorization required
146 |
147 | When using `docker` and you get
148 |
149 | Authorization required, but no authorization protocol specified
150 |
151 | you need to run
152 |
153 | xhost local:root
154 |
155 | on your host. The problem is that docker runs all container as root, who is by default
156 | not allowed to access XServer of your local running user. However, the `xhost` command
157 | can allow that.
158 | ### Further Authentication
159 |
160 | If he still wants more authentication, you might need to pass a token generated by `xauth list` from the host to the guest, so that the guest can connect to the XServer on the host. I did not tested that yet, see [here](https://gitlab.com/raabf/dockertex/-/issues/1#note_1044600240).
161 |
162 | ### DISPLAY variable
163 |
164 | If he complains that the Display is not found, you might have to replace in the `dockertexstudio.sh` script `--env='DISPLAY'` with `-e DISPLAY=unix$DISPLAY`.
165 | This might be environment specific and I do not know the conditions for that.
166 |
167 | ### Remove Network
168 |
169 | A [user reported](https://gitlab.com/raabf/dockertex/-/issues/1#note_196754578) that it helps to remove the shared network by removing the line `--network=host` in `dockertexstudio.sh`. However, TexStudio then cannot access network resources like Laguagetool.
170 |
171 | ### x11docker
172 |
173 | You might try [`x11docker`](https://github.com/mviereck/x11docker) instead of `dockertexstudio.sh`, which can setup GUI apps in containers. For example, you can call
174 |
175 | x11docker --network=host --share $HOME raabf/texstudio-versions:texlive2019
176 |
177 | ### More resources
178 |
179 | In [this issue](https://gitlab.com/raabf/dockertex/-/issues/1) you find some more hints and links, which might have solutions.
180 |
181 | ## 🛠 Installation
182 |
183 | ### 👔 zsh plugin manager
184 |
185 | The most comfortable method to install it, is with a zsh plugin-manager. This approach has the big advantage that dockertex CLI will be updated together with your other plugins.
186 |
187 | The script `/posthook.sh` can install a menu entry into your desktop environment. The mandatory option `--menu-tag` allows to specify a docker tag for the menu entry. For mounting additional volumes, use the `--menu-volume` option—the syntax is the same as in `docker run`, except that you have to replace `:` with `=` because zplug does not allow a `:` in a string. Use `./posthook.sh …; ./posthook.sh …` multiple times for installing multiple menu entries for different tags.
188 |
189 | Please consult the built-in help if you want to find out what the default installation paths are or to change those.
190 |
191 | curl https://gitlab.com/raabf/dockertex/raw/master/posthook.sh | bash -s -- --help
192 |
193 |
194 | To install dockertex CLI, just add the repository to your plugin configuration in your `~/.zshrc`. If you want to create a menu entries for TeXstudio, add `./posthook.sh` to the hook-build. For example your configuration could look like:
195 |
196 |
197 | #### zplug
198 |
199 | zplug raabf/dockertex, \
200 | from:gitlab, \
201 | hook-build:"./posthook.sh --menu-tag latest --menu-volume /media/ext/=/home/ext/"
202 |
203 |
204 | It should work also with any other plugin manager. If you have tested it with other plugin managers and if you want to extend this list please tell me at the [issues board](https://gitlab.com/raabf/dockertex/issues).
205 |
206 |
207 | ### ⛓ Automated script
208 |
209 | If you do not have zsh, you can install the dockertex CLI and the TeXstudio menu entries through an install script.
210 |
211 | The mandatory option `--menu-tag` allows to install a menu entry into your desktop environment. For mounting additional volumes, use the `--menu-volume` option—the syntax is the same as in `docker run`. Just execute the script multiple times if want to have multiple menu entries with different tags.
212 |
213 | Just run `install.sh` with:
214 |
215 | curl https://gitlab.com/raabf/dockertex/raw/master/install.sh | bash -s -- --menu-tag latest --menu-volume "/media/ext/:/home/ext/"
216 |
217 |
218 | or to install it system wide
219 |
220 | curl https://gitlab.com/raabf/dockertex/raw/master/install.sh | bash -s -- --system --menu-tag latest --menu-volume /media/ext/:/home/ext/"
221 |
222 |
223 | Just leave out the `--menu-tag` and `--menu-volume` options if you do not want to create any menu entry.
224 |
225 | If you neither want to install the texstudio script nor the menu entries, use the `--no-texstudio` option.
226 |
227 | curl https://gitlab.com/raabf/dockertex/raw/master/install.sh | bash -s -- --no-texstudio
228 |
229 |
230 | Please consult the built-in help if you want to find out what the default installation paths are or to change those.
231 |
232 | curl https://gitlab.com/raabf/dockertex/raw/master/install.sh | bash -s -- --help
233 |
234 |
235 | ### 🔨 Manual
236 |
237 | Copy the scripts from `bin/` to a folder in your `PATH` such as `/usr/local/bin/`:
238 |
239 | sudo cp bin/dockertex.sh /usr/local/bin/dockertex; sudo cp bin/dockertexstudio.sh /usr/local/bin/dockertexstudio
240 |
241 |
242 | Make sure that the files have the executable bit set
243 |
244 | chmod a+x /usr/local/bin/dockertex*
245 |
246 |
247 | Copy TeXstudio icon to an arbitrary place:
248 |
249 | cp misc/icons/hicolor/scalable/apps/texstudio.svg /usr/local/share/icons/hicolor/scalable/apps/texstudio.svg
250 |
251 |
252 | Use the template `misc/dockertexstudio.desktop` to create one or multiple menu entry:
253 |
254 | cp misc/dockertexstudio.desktop /usr/local/share/applications/dockertexstudio-stretch.desktop
255 |
256 |
257 | Then append the missing fields:
258 |
259 | echo "Name=Docker TexStudio (stretch)
260 | Exec=/usr/local/bin/dockertexstudio --tag latest %F
261 | Icon=/usr/local/share/icons/hicolor/scalable/apps/texstudio.svg" >> /usr/local/share/applications/dockertexstudio-stretch.desktop
262 |
263 |
264 | ## 🎈 Continuous Integration (CI)
265 |
266 | The latex images are working well for automatically build your output PDF in a Continuous Integration (CI) system.
267 |
268 | ### GitLab CI
269 |
270 | First you have to register a [runner](https://docs.gitlab.com/runner/) at one of your servers with installed docker. The only important thing is that you choose `docker` as executor. The given image is just a default docker image which can be overwritten later in the project config.
271 |
272 | sudo gitlab-runner register --url https://gitlab.com/ --executor "docker" --tag-list "docker, latex, dockertex" --docker-image "raabf/latex-versions:latest"
273 |
274 | Then add the CI configuration file `.gitlab-ci.yml` to your git root. Use the following one as a template:
275 |
276 | ```yaml
277 | ---
278 | stages:
279 | - latex
280 |
281 | before_script:
282 | - lsb_release --all
283 | - latex --version
284 |
285 | make_texlive2016:
286 | image: raabf/latex-versions:texlive2016
287 | stage: latex
288 | tags:
289 | - docker
290 | script:
291 | - make all
292 | artifacts:
293 | paths:
294 | - ./thesis.pdf
295 | expire_in: 1 week
296 |
297 |
298 | # test your latex file on multiple versions
299 |
300 | make_texlive2017:
301 | image: raabf/latex-versions:texlive2017
302 | stage: latex
303 | tags:
304 | - docker
305 | script:
306 | - make all
307 | artifacts:
308 | paths:
309 | - ./thesis.pdf
310 | expire_in: 1 week
311 |
312 | make_texlive2015:
313 | image: raabf/latex-versions:texlive2015
314 | stage: latex
315 | tags:
316 | - docker
317 | script:
318 | - make all
319 | artifacts:
320 | paths:
321 | - ./thesis.pdf
322 | expire_in: 1 week
323 | ```
324 |
325 | In this example `thesis.pdf` is your output. The artifact section will upload the specified file at the CI’s Web-Interface and make it even available for viewing and downloading!
326 |
327 | 
328 |
329 |
330 | Did you test it with other CI systems and want to extend this list of examples? Please tell me at the [issues board](https://gitlab.com/raabf/dockertex/issues).
331 |
332 |
333 | ## 💡 Contributing
334 |
335 | This project aims to be a generalized latex environment for the majority of latex projects.
336 | If something is missing or not working, then I’m happy for any contribution. You can find the [repository](https://gitlab.com/raabf/dockertex/) and [issues board](https://gitlab.com/raabf/dockertex/issues) at GitLab.
337 |
--------------------------------------------------------------------------------
/bin/dockertex.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #############################################################
3 | ## Title: docketex
4 | ## Abstact: Ececutes a command in a latex container
5 | ## within the current working directory.
6 | ## Author: Fabian Raab
7 | ## Dependencies: docker/podman
8 | ## Creation Date: 2017-10-28
9 | ## Last Edit: 2018-03-22
10 | ##############################################################
11 |
12 |
13 | SCRIPTNAME=$(basename $0)
14 | SCRIPTPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
15 | EXIT_SUCCESS=0
16 | EXIT_FAILURE=1
17 | EXIT_ERROR=2
18 | EXIT_BUG=10
19 |
20 | LATEX_IMAGE_NAME="raabf/latex-versions"
21 | LATEX_ARM_IMAGE_NAME="raabf/latex-versions-arm"
22 | TEXSTUDIO_IMAGE_NAME="raabf/texstudio-versions"
23 |
24 | # Check which container engine to use. Prefer podman since distros (e.g. Fedora) start to deprecate docker.
25 | if [[ -z $DOCKERTEX_ENGINE ]]; then
26 | if hash podman; then
27 | engine=podman
28 | elif hash docker; then
29 | engine=docker
30 | fi
31 | else
32 | engine="${DOCKERTEX_ENGINE}"
33 | fi
34 |
35 | image_tag="${DOCKERTEX_DEFAULT_TAG}"
36 |
37 | ##### Colors #####
38 | RCol='\e[0m' # Text Reset
39 |
40 | # Regular Bold Underline High Intensity BoldHigh Intens Background High Intensity Backgrounds
41 | Bla='\e[0;30m'; BBla='\e[1;30m'; UBla='\e[4;30m'; IBla='\e[0;90m'; BIBla='\e[1;90m'; On_Bla='\e[40m'; On_IBla='\e[0;100m';
42 | Red='\e[0;31m'; BRed='\e[1;31m'; URed='\e[4;31m'; IRed='\e[0;91m'; BIRed='\e[1;91m'; On_Red='\e[41m'; On_IRed='\e[0;101m';
43 | Gre='\e[0;32m'; BGre='\e[1;32m'; UGre='\e[4;32m'; IGre='\e[0;92m'; BIGre='\e[1;92m'; On_Gre='\e[42m'; On_IGre='\e[0;102m';
44 | Yel='\e[0;33m'; BYel='\e[1;33m'; UYel='\e[4;33m'; IYel='\e[0;93m'; BIYel='\e[1;93m'; On_Yel='\e[43m'; On_IYel='\e[0;103m';
45 | Blu='\e[0;34m'; BBlu='\e[1;34m'; UBlu='\e[4;34m'; IBlu='\e[0;94m'; BIBlu='\e[1;94m'; On_Blu='\e[44m'; On_IBlu='\e[0;104m';
46 | Pur='\e[0;35m'; BPur='\e[1;35m'; UPur='\e[4;35m'; IPur='\e[0;95m'; BIPur='\e[1;95m'; On_Pur='\e[45m'; On_IPur='\e[0;105m';
47 | Cya='\e[0;36m'; BCya='\e[1;36m'; UCya='\e[4;36m'; ICya='\e[0;96m'; BICya='\e[1;96m'; On_Cya='\e[46m'; On_ICya='\e[0;106m';
48 | Whi='\e[0;37m'; BWhi='\e[1;37m'; UWhi='\e[4;37m'; IWhi='\e[0;97m'; BIWhi='\e[1;97m'; On_Whi='\e[47m'; On_IWhi='\e[0;107m';
49 |
50 |
51 | ###### Functions ######
52 |
53 | function usage #(exit_code: Optional)
54 | {
55 | echo -e "${BRed}Usage: ${Yel}$SCRIPTNAME${RCol} [${Blu}-t|--tag ${UGre}tagname${RCol}] ${UGre}command${RCol}
56 | ${Yel}$SCRIPTNAME${RCol} [${Blu}-h|--help${RCol}]
57 |
58 | Launches the $TEXSTUDIO_IMAGE_NAME – or if not available as
59 | alternative the $LATEX_IMAGE_NAME or $LATEX_ARM_IMAGE_NAME docker-container –
60 | with the tag ${UGre}tagname${RCol} and adds the current working directory as a volume.
61 | Then ${UGre}command${RCol} is executed in the container in the
62 | current working directory. Afterwards, the container is removed.
63 |
64 | ${BRed}OPTIONS:${RCol}
65 | ${Blu}-h, --help${RCol}
66 | Print this help and exit.
67 |
68 | ${Blu}-t, --tag ${UGre}tagname${RCol}
69 | The latex docker container with tag ${UGre}tagname${RCol} will be used.
70 | If this option is omitted, ${UGre}tagname${RCol} defaults to the
71 | environment variable ${Blu}DOCKERTEX_DEFAULT_TAG${RCol}.
72 |
73 | ${Blu}--engine ${UGre}enginename${RCol}
74 | The executable ${UGre}enginename${RCol} will be used to run the container.
75 | It defaults to ${Gre}podman${RCol} when it is installed, else ${Gre}docker${RCol}.
76 |
77 |
78 | ${BRed}EXAMPLES:${RCol}
79 | ${Yel}$SCRIPTNAME${RCol} ${Blu}--tag ${Gre}texlive2016${RCol} ${Gre}make all${RCol}
80 | ${Yel}$SCRIPTNAME${RCol} ${Blu}--tag ${Gre}arm64-texlive2016${RCol} ${Gre}make${RCol}
81 | ${Yel}export${RCol} ${Blu}DOCKERTEX_DEFAULT_TAG${RCol}=${Gre}texlive2017${RCol}
82 | ${Yel}$SCRIPTNAME${RCol} ${Gre}pdflatex document.tex${RCol}
83 |
84 | ${BRed}EXIT STATUS:${RCol}
85 | If everything is successfull the script will exit with $EXIT_SUCCESS.
86 | Failure exit statuses of the script itself are $EXIT_FAILURE, $EXIT_ERROR, and $EXIT_BUG.
87 | When ${Yel}docker run${RCol} is executed it returns whatever this command
88 | returns. See docker run manpage for further information.
89 | "
90 | [[ $# -eq 1 ]] && exit $1 || exit $EXIT_FAILURE
91 | }
92 |
93 |
94 | ###### Parse Options ######
95 |
96 | # first ':' prevents getopts error messages
97 | optspec=':t:h-:'
98 |
99 | while getopts "$optspec" OPTION ; do
100 | case $OPTION in
101 | -)
102 | case "${OPTARG}" in
103 | help)
104 | usage $EXIT_SUCCESS
105 | ;;
106 | tag)
107 | image_tag="${!OPTIND}"; OPTIND=$(( $OPTIND + 1 ))
108 | ;;
109 | engine)
110 | engine="${!OPTIND}"; OPTIND=$(( $OPTIND + 1 ))
111 | ;;
112 | *)
113 | if [ "$OPTERR" = 1 ] && [ "${optspec:0:1}" == ":" ]; then
114 | echo -e "${Red}Unknown option ${Blu}--$OPTARG${Red}.${RCol}" >&2
115 | echo -e ""
116 | usage $EXIT_FAILURE
117 | fi
118 | ;;
119 | esac
120 | ;;
121 | h)
122 | usage $EXIT_SUCCESS
123 | ;;
124 | t)
125 | image_tag=$OPTARG
126 | ;;
127 | \?)
128 | echo -e "${Red}Unknown option ${Blu}-$OPTARG\"${Red}.${RCol}" >&2
129 | echo -e ""
130 | usage $EXIT_ERROR
131 | ;;
132 | :) echo -e "${Red}Option ${Blu}-$OPTARG${Red} needs an argument.${RCol}" >&2
133 | echo -e ""
134 | usage $EXIT_ERROR
135 | ;;
136 | *) echo -e "${Red}ERROR: This should not happen.${RCol}" >&2
137 | echo -e ""
138 | usage $EXIT_BUG
139 | ;;
140 | esac
141 | done
142 |
143 | # jump over consumed arguments
144 | shift $(( OPTIND - 1 ))
145 |
146 | # Testing if there are enough arguments
147 | if (( $# < 1 )) ; then
148 | echo -e "${Red}At least one argument is required.${RCol}" >&2
149 | echo -e ""
150 | usage $EXIT_FAILURE
151 | fi
152 |
153 | if [[ -z $engine ]]; then
154 | echo -e "${Red}No supported engine found!${RCol}" >&2
155 | echo -e "${Red}Install either docker or podman, or set the correct path to${RCol}" >&2
156 | echo -e "${Red}the binary with the DOCKERTEX_ENGINE variable or --engine option.${RCol}" >&2
157 | fi
158 |
159 | ####### Commands ######
160 |
161 | if [ "$image_tag" == "" ]; then
162 | echo -e "${Red}${Blu}-t, --tag${Red} was omitted and ${Yel}DOCKERTEX_DEFAULT_TAG${Red} is empty. Please specify a ${UGre}tagname${Red}.${RCol}" >&2
163 | exit $EXIT_FAILURE
164 | fi
165 |
166 |
167 | if $engine inspect --type=image $TEXSTUDIO_IMAGE_NAME:$image_tag > /dev/null 2>&1; then
168 | image_name=$TEXSTUDIO_IMAGE_NAME
169 | else
170 | if $engine inspect --type=image $LATEX_IMAGE_NAME:$image_tag > /dev/null 2>&1; then
171 | image_name=$LATEX_IMAGE_NAME
172 | else
173 | if $engine inspect --type=image $LATEX_ARM_IMAGE_NAME:$image_tag > /dev/null 2>&1; then
174 | image_name=$LATEX_ARM_IMAGE_NAME
175 | else
176 | echo -e "${Red}The requested docker image with tag ${Gre}$image_tag${Red} is locally not available.
177 | Please use one of the following commands to obtain it:" >&2
178 | if [[ ${image_tag%%-*} == "arm"* ]]; then
179 | echo -e " ${Blu}$engine pull ${Gre}$LATEX_ARM_IMAGE_NAME:$image_tag${RCol}" >&2
180 | else
181 | echo -e " ${Blu}$engine pull ${Gre}$LATEX_IMAGE_NAME:$image_tag${RCol}
182 | ${Blu}$engine pull ${Gre}$TEXSTUDIO_IMAGE_NAME:$image_tag${RCol}" >&2
183 | fi
184 | exit $EXIT_FAILURE
185 | fi
186 | fi
187 | fi
188 |
189 | # Build the the main command. This rather complcated way is because the --user option breaks file access on podman.
190 | # For reference see: https://github.com/containers/libpod/issues/2898
191 | base_cmd="$engine run --rm --interactive \
192 | --name=latex_$image_tag --net=none \
193 | --volume=$PWD:/home/workdir \
194 | --workdir=/home/workdir \
195 | -e HOME=/home"
196 |
197 | if [[ "$engine" == "docker" ]]; then
198 | base_cmd="$base_cmd --user=$(id --user):$(id --group)"
199 | fi
200 |
201 | base_cmd="$base_cmd $image_name:$image_tag $@"
202 |
203 | $base_cmd || exit $?
204 |
205 |
--------------------------------------------------------------------------------
/bin/dockertexstudio.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #############################################################
3 | ## Title: docketexstudio
4 | ## Abstact: Starts texstudio in a docker container
5 | ## Author: Fabian Raab
6 | ## Dependencies: docker
7 | ## Creation Date: 2017-10-28
8 | ## Last Edit: 2018-03-22
9 | ##############################################################
10 |
11 |
12 | SCRIPTNAME=$(basename $0)
13 | SCRIPTPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
14 | EXIT_SUCCESS=0
15 | EXIT_FAILURE=1
16 | EXIT_ERROR=2
17 | EXIT_BUG=10
18 |
19 | TEXSTUDIO_IMAGE_NAME="raabf/texstudio-versions"
20 | TEXSTUDIO_CONFIG_PATH="$HOME/.config/dockertexstudio"
21 |
22 | # Check which container engine to use. Prefer podman since distros (e.g. Fedora) start to deprecate docker.
23 | if [[ -z $DOCKERTEX_ENGINE ]]; then
24 | if hash podman; then
25 | engine=podman
26 | elif hash docker; then
27 | engine=docker
28 | fi
29 | else
30 | engine="${DOCKERTEX_ENGINE}"
31 | fi
32 |
33 |
34 | image_tag="${DOCKERTEX_DEFAULT_TAG}"
35 | volumes=""
36 |
37 | ##### Colors #####
38 | RCol='\e[0m' # Text Reset
39 |
40 | # Regular Bold Underline High Intensity BoldHigh Intens Background High Intensity Backgrounds
41 | Bla='\e[0;30m'; BBla='\e[1;30m'; UBla='\e[4;30m'; IBla='\e[0;90m'; BIBla='\e[1;90m'; On_Bla='\e[40m'; On_IBla='\e[0;100m';
42 | Red='\e[0;31m'; BRed='\e[1;31m'; URed='\e[4;31m'; IRed='\e[0;91m'; BIRed='\e[1;91m'; On_Red='\e[41m'; On_IRed='\e[0;101m';
43 | Gre='\e[0;32m'; BGre='\e[1;32m'; UGre='\e[4;32m'; IGre='\e[0;92m'; BIGre='\e[1;92m'; On_Gre='\e[42m'; On_IGre='\e[0;102m';
44 | Yel='\e[0;33m'; BYel='\e[1;33m'; UYel='\e[4;33m'; IYel='\e[0;93m'; BIYel='\e[1;93m'; On_Yel='\e[43m'; On_IYel='\e[0;103m';
45 | Blu='\e[0;34m'; BBlu='\e[1;34m'; UBlu='\e[4;34m'; IBlu='\e[0;94m'; BIBlu='\e[1;94m'; On_Blu='\e[44m'; On_IBlu='\e[0;104m';
46 | Pur='\e[0;35m'; BPur='\e[1;35m'; UPur='\e[4;35m'; IPur='\e[0;95m'; BIPur='\e[1;95m'; On_Pur='\e[45m'; On_IPur='\e[0;105m';
47 | Cya='\e[0;36m'; BCya='\e[1;36m'; UCya='\e[4;36m'; ICya='\e[0;96m'; BICya='\e[1;96m'; On_Cya='\e[46m'; On_ICya='\e[0;106m';
48 | Whi='\e[0;37m'; BWhi='\e[1;37m'; UWhi='\e[4;37m'; IWhi='\e[0;97m'; BIWhi='\e[1;97m'; On_Whi='\e[47m'; On_IWhi='\e[0;107m';
49 |
50 |
51 | ###### Functions ######
52 |
53 | function usage #(exit_code: Optional)
54 | {
55 | echo -e "${BRed}Usage: ${Yel}$SCRIPTNAME${RCol} [${Blu}-t|--tag ${UGre}tagname${RCol}] [${Blu}-v|--volume ${UGre}mapping${RCol}]* [- ${UGre}texstudio options${RCol}]
56 | ${Yel}$SCRIPTNAME${RCol} ${Blu}-h|--help${RCol}
57 | ${Yel}$SCRIPTNAME${RCol} [${Blu}-t|--tag ${UGre}tagname${RCol}] - ${Blu}--help${RCol}
58 |
59 | Launches the $TEXSTUDIO_IMAGE_NAME docker-container and adds the home
60 | directory as a volume to ${Yel}/home/\$HOME${RCol} in the docker container. Then
61 | texstudio is started in the container with ${UGre}texstudio options${RCol} as parameters.
62 | TexStudios cofiguration is stored at ${Yel}$TEXSTUDIO_CONFIG_PATH${RCol}
63 | Afterwards, the container is removed.
64 |
65 | ${BRed}OPTIONS:${RCol}
66 | ${Blu}-h, --help${RCol}
67 | Print this help text and exit.
68 |
69 | - ${Blu}--help${RCol}
70 | Print texstudio help for the available ${UGre}texstudio options${RCol} and exit.
71 |
72 | ${Blu}-t, --tag ${UGre}tagname${RCol}
73 | The latex docker container with tag ${UGre}tagname${RCol} will be used.
74 | If this option is omitted, ${UGre}tagname${RCol} defaults to the
75 | environment variable ${Blu}DOCKERTEX_DEFAULT_TAG${RCol}.
76 |
77 | ${Blu}-v, --volume ${UGre}mapping${RCol}
78 | Mounts an additional volume into the docker-container. The
79 | syntax of ${UGre}mapping${RCol} is the same as in ${Yel}docker run${RCol}.
80 | This option can be repeated.
81 |
82 | ${Blu}--engine ${UGre}enginename${RCol}
83 | The executable ${UGre}enginename${RCol} will be used to run the container.
84 | It defaults to ${Gre}podman${RCol} when it is installed, else ${Gre}docker${RCol}.
85 |
86 | ${BRed}EXIT STATUS:${RCol}
87 | If everything is successfull the script will exit with $EXIT_SUCCESS.
88 | Failure exit statuses of the script itself are $EXIT_FAILURE, $EXIT_ERROR, and $EXIT_BUG.
89 | When ${Yel}docker run${RCol} is executed it returns whatever this command
90 | returns. See docker run manpage for further information.
91 | "
92 | [[ $# -eq 1 ]] && exit $1 || exit $EXIT_FAILURE
93 | }
94 |
95 |
96 | ###### Parse Options ######
97 |
98 | # first ':' prevents getopts error messages
99 | optspec=':t:v:h-:'
100 |
101 | while getopts "$optspec" OPTION ; do
102 | case $OPTION in
103 | -)
104 | case "${OPTARG}" in
105 | help)
106 | usage $EXIT_SUCCESS
107 | ;;
108 | tag)
109 | image_tag="${!OPTIND}"; OPTIND=$(( $OPTIND + 1 ))
110 | ;;
111 | engine)
112 | engine="${!OPTIND}"; OPTIND=$(( $OPTIND + 1 ))
113 | ;;
114 | volume)
115 | volumes="$volumes --volume=${!OPTIND}"; OPTIND=$(( $OPTIND + 1 ))
116 | ;;
117 | *)
118 | if [ "$OPTERR" = 1 ] && [ "${optspec:0:1}" == ":" ]; then
119 | echo -e "${Red}Unknown option ${Blu}--$OPTARG${Red}.${RCol}" >&2
120 | echo -e ""
121 | usage $EXIT_FAILURE
122 | fi
123 | ;;
124 | esac
125 | ;;
126 | h)
127 | usage $EXIT_SUCCESS
128 | ;;
129 | t)
130 | image_tag=$OPTARG
131 | ;;
132 | v)
133 | volumes="$volumes --volume=${OPTARG}"
134 | ;;
135 | \?)
136 | echo -e "${Red}Unknown option ${Blu}-$OPTARG\"${Red}.${RCol}" >&2
137 | echo -e ""
138 | usage $EXIT_ERROR
139 | ;;
140 | :) echo -e "${Red}Option ${Blu}-$OPTARG${Red} needs an argument.${RCol}" >&2
141 | echo -e ""
142 | usage $EXIT_ERROR
143 | ;;
144 | *) echo -e "${Red}ERROR: This should not happen.${RCol}" >&2
145 | echo -e ""
146 | usage $EXIT_BUG
147 | ;;
148 | esac
149 | done
150 |
151 | # jump over consumed arguments
152 | shift $(( OPTIND - 1 ))
153 |
154 | if [[ -z $engine ]]; then
155 | echo -e "${Red}No supported engine found!${RCol}" >&2
156 | echo -e "${Red}Install either docker or podman, or set the correct path to${RCol}" >&2
157 | echo -e "${Red}the binary with the DOCKERTEX_ENGINE variable or --engine option.${RCol}" >&2
158 | fi
159 |
160 | ####### Commands ######
161 |
162 | if [ "$image_tag" == "" ]; then
163 | echo -e "${Red}${Blu}-t, --tag${Red} was omitted and ${Yel}DOCKERTEX_DEFAULT_TAG${Red} is empty. Please specify a ${UGre}tagname${Red}.${RCol}" >&2
164 | exit $EXIT_ERROR
165 | fi
166 |
167 |
168 | if ! "${engine}" inspect --type=image $TEXSTUDIO_IMAGE_NAME:$image_tag > /dev/null 2>&1; then
169 | echo -e "${Red}Container image ${Gre}$TEXSTUDIO_IMAGE_NAME:$image_tag${Red} is locally not available. Please
170 | use the following command to obtain it:
171 | ${Blu}${engine} pull ${Gre}$TEXSTUDIO_IMAGE_NAME:$image_tag${RCol}" >&2
172 | exit $EXIT_FAILURE
173 | fi
174 |
175 | # Error message when root is not allowed to access X Server:
176 | # “
177 | # XDG_RUNTIME_DIR = /run/user/1000
178 | # Authorization required, but no authorization protocol specified
179 | # qt.qpa.xcb: could not connect to display :0
180 | # qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
181 | # This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
182 | #
183 | # Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.
184 | # ”
185 | # then run `xhost local:root`
186 | # See https://baireuther.de/lhb/verbindung-zum-x-server-fur-root-erlauben/
187 |
188 | # I needed Before ~2019 `-e DISPLAY=unix$DISPLAY` instead of `-e DISPLAY=$DISPLAY`
189 |
190 | # If there are further authorization problems this might help
191 | # --volume="$HOME/.Xauthority:/root/.Xauthority:rw"
192 | # It is used by the command `xauth`, which must be installed on both host and guest!
193 | # See https://medium.com/theleanprogrammer/run-gui-application-over-docker-86672f55211
194 | #
195 | # Just adding above Xauthority volume might not sufficient and you have to add
196 | # the auth token to Xauthority, which can be scripted
197 | # See https://blog.yadutaf.fr/2017/09/10/running-a-graphical-app-in-a-docker-container-on-a-remote-server/
198 | #
199 | # This can be done manuallyby calling
200 | # xauth list
201 | # on the host and copy the token of first line which should be something like
202 | # x390y/unix:0 MIT-MAGIC-COOKIE-1 9a769b224869f9c82fd33bde730ec2cc
203 | # to the guest with the command
204 | # xauth add "9a769b224869f9c82fd33bde730ec2cc"
205 | # See https://www.howtogeek.com/devops/how-to-run-gui-applications-in-a-docker-container/
206 |
207 | echo "engine $engine"
208 | base_cmd="$engine run --rm \
209 | --cap-drop=all \
210 | --network=host \
211 | --volume=/tmp/.X11-unix:/tmp/.X11-unix \
212 | --env=DISPLAY \
213 | -e XDG_RUNTIME_DIR=\"$XDG_RUNTIME_DIR\" \
214 | --volume=$TEXSTUDIO_CONFIG_PATH:/home/.config/texstudio \
215 | --volume=$XDG_RUNTIME_DIR:$XDG_RUNTIME_DIR \
216 | --volume=$HOME/:$HOME/ $volumes \
217 | -e HOME=/home/ \
218 | --name=texstudio_$image_tag --workdir=/home/"
219 |
220 | if [[ "$engine" == "docker" ]]; then
221 | base_cmd="$base_cmd --user=$(id --user):$(id --group)"
222 | fi
223 |
224 | base_cmd="$base_cmd $TEXSTUDIO_IMAGE_NAME:$image_tag texstudio"
225 |
226 | if [ "$@" != "" ]; then
227 | base_cmd="$base_cmd \"$@\""
228 | fi
229 |
230 | $base_cmd || exit $?
231 |
--------------------------------------------------------------------------------
/dockertex.plugin.zsh:
--------------------------------------------------------------------------------
1 | #!/bin/zsh
2 |
3 | 0=${(%):-%N}
4 | DOCKERTEX_ROOT="${0:A:h}"
5 |
6 | dockertex()
7 | {
8 | # `bash -c ...` manipulates $0 so that it contain `dockertex`
9 | # instead of `dockertex.sh`
10 | bash -c ". ${DOCKERTEX_ROOT}/bin/dockertex.sh" dockertex ${@}
11 | }
12 |
13 |
--------------------------------------------------------------------------------
/dockertexstudio.plugin.zsh:
--------------------------------------------------------------------------------
1 | #!/bin/zsh
2 |
3 | 0=${(%):-%N}
4 | DOCKERTEX_ROOT="${0:A:h}"
5 |
6 | dockertexstudio()
7 | {
8 | # `bash -c ...` manipulates $0 so that it contain `dockertexstudio`
9 | # instead of `dockertexstudio.sh`
10 | bash -c ". ${DOCKERTEX_ROOT}/bin/dockertexstudio.sh" dockertexstudio ${@}
11 | }
12 |
13 |
--------------------------------------------------------------------------------
/install.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #############################################################
3 | ## Title: docketex posthook
4 | ## Abstact: installs texstudio menu entry in user home
5 | ## Author: Fabian Raab
6 | ## Dependencies: docker
7 | ## Creation Date: 2017-11-02
8 | ## Last Edit: 2017-11-05
9 | ##############################################################
10 |
11 |
12 | SCRIPTNAME=$(basename $0)
13 | SCRIPTPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
14 | EXIT_SUCCESS=0
15 | EXIT_FAILURE=1
16 | EXIT_ERROR=2
17 | EXIT_BUG=10
18 |
19 | home_icon_prefix="$HOME/.local/share/icons"
20 | home_applications_prefix="$HOME/.local/share/applications"
21 | home_bin_prefix="$HOME/.local/bin"
22 |
23 | is_system=false
24 | no_texstudio=false
25 | force_download=false
26 | system_icon_prefix="/usr/local/share/icons"
27 | system_applications_prefix="/usr/local/share/applications"
28 | system_bin_prefix="/usr/local/bin"
29 | volumes=""
30 |
31 | DOCKERTEX_SH_URL="https://gitlab.com/raabf/dockertex/raw/master/bin/dockertex.sh"
32 | DOCKERTEXSTUDIO_SH_URL="https://gitlab.com/raabf/dockertex/raw/master/bin/dockertexstudio.sh"
33 |
34 | DOCKERTEXSTUDIO_DESKTOP_URL="https://gitlab.com/raabf/dockertex/raw/master/misc/dockertexstudio.desktop"
35 | DOCKERTEXSTUDIO_SVG_URL="https://gitlab.com/raabf/dockertex/raw/master/misc/icons/hicolor/scalable/apps/texstudio.svg"
36 |
37 |
38 | ##### Colors #####
39 | RCol='\e[0m' # Text Reset
40 |
41 | # Regular Bold Underline High Intensity BoldHigh Intens Background High Intensity Backgrounds
42 | Bla='\e[0;30m'; BBla='\e[1;30m'; UBla='\e[4;30m'; IBla='\e[0;90m'; BIBla='\e[1;90m'; On_Bla='\e[40m'; On_IBla='\e[0;100m';
43 | Red='\e[0;31m'; BRed='\e[1;31m'; URed='\e[4;31m'; IRed='\e[0;91m'; BIRed='\e[1;91m'; On_Red='\e[41m'; On_IRed='\e[0;101m';
44 | Gre='\e[0;32m'; BGre='\e[1;32m'; UGre='\e[4;32m'; IGre='\e[0;92m'; BIGre='\e[1;92m'; On_Gre='\e[42m'; On_IGre='\e[0;102m';
45 | Yel='\e[0;33m'; BYel='\e[1;33m'; UYel='\e[4;33m'; IYel='\e[0;93m'; BIYel='\e[1;93m'; On_Yel='\e[43m'; On_IYel='\e[0;103m';
46 | Blu='\e[0;34m'; BBlu='\e[1;34m'; UBlu='\e[4;34m'; IBlu='\e[0;94m'; BIBlu='\e[1;94m'; On_Blu='\e[44m'; On_IBlu='\e[0;104m';
47 | Pur='\e[0;35m'; BPur='\e[1;35m'; UPur='\e[4;35m'; IPur='\e[0;95m'; BIPur='\e[1;95m'; On_Pur='\e[45m'; On_IPur='\e[0;105m';
48 | Cya='\e[0;36m'; BCya='\e[1;36m'; UCya='\e[4;36m'; ICya='\e[0;96m'; BICya='\e[1;96m'; On_Cya='\e[46m'; On_ICya='\e[0;106m';
49 | Whi='\e[0;37m'; BWhi='\e[1;37m'; UWhi='\e[4;37m'; IWhi='\e[0;97m'; BIWhi='\e[1;97m'; On_Whi='\e[47m'; On_IWhi='\e[0;107m';
50 |
51 |
52 | ###### Functions ######
53 |
54 | function usage #(exit_code: Optional)
55 | {
56 | echo -e "Usage: ${Yel}$SCRIPTNAME${RCol} [${Blu}--menu-tag ${UGre}tagname${RCol}] [${Blu}--menu-volume ${UGre}mapping${RCol}]* [${Blu}--system${RCol}] [${Blu}--no-texstudio${RCol}] ${Blu}--icon-prefix ${UGre}icons dir${RCol}] [${Blu}--app-prefix ${UGre}applications dir${RCol}] [${Blu}--bin-prefix ${UGre}bin dir${RCol}]
57 | ${Yel}$SCRIPTNAME${RCol} [${Blu}-h|--help${RCol}]
58 |
59 | Installs sctipts and texstudio menu entry in user home or in the specifed directories.
60 |
61 | ${BRed}OPTIONS:${RCol}
62 | ${Blu}-h, --help${RCol}
63 | Print this help and exit.
64 |
65 | ${Blu}--menu-tag ${UGre}tagname${RCol}
66 | When specified, it installs a menu entry, which starts texstudio
67 | in the texstudio docker-container with tag ${UGre}tagname${RCol}.
68 |
69 | ${Blu}--menu-volume ${UGre}mapping${RCol}
70 | Mounts an additional volume into the docker-container which is
71 | launched by the menu entry. The syntax of ${UGre}mapping${RCol} is the same as
72 | in ${Blu}docker run${RCol}. This option can be repeated.
73 |
74 | ${Blu}--system${RCol}
75 | Install the scripts system wide for multi-user environments. Default is in the
76 | home directory of the current user.
77 |
78 | ${Blu}--download${RCol}
79 | Installer will download required files instead using the files of the local
80 | reposity clone. Every file which do not exist locally will be automatically
81 | downloaded.
82 |
83 | ${Blu}--no-texstudio${RCol}
84 | Does not install texstudio entries.
85 |
86 | ${Blu}--icon-prefix ${UGre}icons dir${RCol}
87 | The script copies the texstudio icon to ${UGre}icons dir${RCol}.
88 | Defaults to $home_icon_prefix/ and $system_icon_prefix/ for ${Blu}--system${RCol}.
89 |
90 | ${Blu}--app-prefix ${UGre}applications dir${RCol}
91 | The script copies the texstudio menu entry (.desktop) to
92 | ${UGre}applications dir${RCol}.
93 | Defaults to $home_applications_prefix/ and $system_applications_prefix/ for ${Blu}--system${RCol}.
94 | ${Blu}--bin-prefix ${UGre}bin dir${RCol}
95 | The script copies the scripts to ${UGre}bin dir${RCol}.
96 | Defaults to $home_bin_prefix/ and $system_bin_prefix/ for ${Blu}--system${RCol}.
97 |
98 |
99 | ${BRed}EXIT STATUS:${RCol}
100 | If everything is successfull the script will exit with $EXIT_SUCCESS.
101 | Failure exit statuses are $EXIT_FAILURE, $EXIT_ERROR, and $EXIT_BUG.
102 | "
103 | [[ $# -eq 1 ]] && exit $1 || exit $EXIT_FAILURE
104 | }
105 |
106 |
107 | function copy_or_download # src, dst, url
108 | {
109 | src="$1"
110 | dst="$2"
111 | url="$3"
112 |
113 | mkdir --parents "$( dirname "$dst" )"
114 |
115 | if [ "$force_download" = false ] && [ -f "$src" ]; then
116 | echo "copy $src -> $dst"
117 | cp "$src" "$dst" || exit $EXIT_ERROR
118 | else
119 | wget --no-verbose --output-document="$dst" "$url" || exit $EXIT_FAILURE
120 | fi
121 | }
122 |
123 |
124 | ###### Parse Options ######
125 |
126 | # first ':' prevents getopts error messages
127 | optspec=':t:h-:'
128 |
129 | while getopts "$optspec" OPTION ; do
130 | case $OPTION in
131 | -)
132 | case "${OPTARG}" in
133 | help)
134 | usage $EXIT_SUCCESS
135 | ;;
136 | menu-tag)
137 | menu_tag="${!OPTIND}"; OPTIND=$(( $OPTIND + 1 ))
138 | ;;
139 | menu-volume)
140 | volumes="$volumes --volume ${!OPTIND}"; OPTIND=$(( $OPTIND + 1 ))
141 | ;;
142 | system)
143 | is_system=true
144 | ;;
145 | download)
146 | force_download=true
147 | ;;
148 | no-texstudio)
149 | no_texstudio=true
150 | ;;
151 | icon-prefix)
152 | arg_icon_prefix="${!OPTIND}"; OPTIND=$(( $OPTIND + 1 ))
153 | ;;
154 | app-prefix)
155 | arg_applications_prefix="${!OPTIND}"; OPTIND=$(( $OPTIND + 1 ))
156 | ;;
157 | bin-prefix)
158 | arg_bin_prefix="${!OPTIND}"; OPTIND=$(( $OPTIND + 1 ))
159 | ;;
160 | *)
161 | if [ "$OPTERR" = 1 ] && [ "${optspec:0:1}" == ":" ]; then
162 | echo -e "${Red}Unknown option ${Blu}--$OPTARG${Red}.${RCol}" >&2
163 | echo -e ""
164 | usage $EXIT_FAILURE
165 | fi
166 | ;;
167 | esac
168 | ;;
169 | h)
170 | usage $EXIT_SUCCESS
171 | ;;
172 | \?)
173 | echo -e "${Red}Unknown option ${Blu}-$OPTARG\"${Red}.${RCol}" >&2
174 | echo -e ""
175 | usage $EXIT_ERROR
176 | ;;
177 | :) echo -e "${Red}Option ${Blu}-$OPTARG${Red} needs an argument.${RCol}" >&2
178 | echo -e ""
179 | usage $EXIT_ERROR
180 | ;;
181 | *) echo -e "${Red}ERROR: This should not happen.${RCol}" >&2
182 | echo -e ""
183 | usage $EXIT_BUG
184 | ;;
185 | esac
186 | done
187 |
188 | # jump over consumed arguments
189 | shift $(( OPTIND - 1 ))
190 |
191 |
192 | ####### Commands ######
193 |
194 | if [ "$is_system" = false ] && [ "$(whoami)" = "root" ]; then
195 | echo -e "${Red}You are trying to install the scripts for a single user
196 | but as user 'root'. This is normally unintended and the
197 | script is therefore aborted. Use ${Blu}--system${Red} to install
198 | it for multi-user and as root.${RCol}"
199 | exit $EXIT_FAILURE
200 | fi
201 |
202 | # select system or single user default paths
203 | if [ "$is_system" = true ]; then
204 | applications_prefix=${arg_applications_prefix:-$system_applications_prefix}
205 | icon_prefix=${arg_icon_prefix:-$system_icon_prefix}
206 | bin_prefix=${arg_bin_prefix:-$system_bin_prefix}
207 | else
208 | applications_prefix=${arg_applications_prefix:-$home_applications_prefix}
209 | icon_prefix=${arg_icon_prefix:-$home_icon_prefix}
210 | bin_prefix=${arg_bin_prefix:-$home_bin_prefix}
211 | fi
212 |
213 | # copy scripts
214 | copy_or_download "$SCRIPTPATH/bin/dockertex.sh" \
215 | "$bin_prefix/dockertex" "$DOCKERTEX_SH_URL"
216 |
217 | desktop_file="$applications_prefix/dockertexstudio-$menu_tag.desktop"
218 |
219 | if [ "$no_texstudio" = false ]; then
220 | copy_or_download "$SCRIPTPATH/bin/dockertexstudio.sh" \
221 | "$bin_prefix/dockertexstudio" "$DOCKERTEXSTUDIO_SH_URL"
222 |
223 | if [ ! -z $menu_tag ]; then
224 | # copy texstudio menu entry
225 |
226 | copy_or_download "$SCRIPTPATH/misc/icons/hicolor/scalable/apps/texstudio.svg" \
227 | "$icon_prefix/hicolor/scalable/apps/texstudio.svg" "$DOCKERTEXSTUDIO_SVG_URL"
228 | # since the above is scalable and we link to the svg directly in the
229 | # desktop file, a single icon is currently sufficient
230 | #cp --recursive --no-target-directory \
231 | # "$SCRIPTPATH/misc/icons/" \
232 | # "$icon_prefix" || exit $EXIT_ERROR
233 |
234 | copy_or_download "$SCRIPTPATH/misc/dockertexstudio.desktop" \
235 | "$desktop_file" "$DOCKERTEXSTUDIO_DESKTOP_URL"
236 |
237 | echo "Name=Docker TexStudio ($menu_tag)" >> "$desktop_file" || exit $EXIT_ERROR
238 | echo "Exec=$bin_prefix/dockertexstudio --tag $menu_tag $volumes %F" >> "$desktop_file" || exit $EXIT_ERROR
239 | #echo "Icon=texstudio" >> "$desktop_file" || exit $EXIT_ERROR
240 | echo "Icon=$icon_prefix/hicolor/scalable/apps/texstudio.svg" >> "$desktop_file" || exit $EXIT_ERROR
241 | fi
242 | fi
243 |
244 | # set correct permissions
245 | if [ "$is_system" = true ]; then
246 | chmod a+rx "$bin_prefix/dockertex" || exit $EXIT_ERROR
247 | if [ "$no_texstudio" = false ]; then
248 | chmod a+rx "$bin_prefix/dockertexstudio" || exit $EXIT_ERROR
249 | if [ ! -z $menu_tag ]; then
250 | chmod 644 "$desktop_file" || exit $EXIT_ERROR
251 | chmod --recursive u=w,a+rX $icon_prefix || exit $EXIT_ERROR
252 | fi
253 | fi
254 | else
255 | chmod u+rx "$bin_prefix/dockertex" || exit $EXIT_ERROR
256 | if [ "$no_texstudio" = false ]; then
257 | chmod u+rx "$bin_prefix/dockertexstudio" || exit $EXIT_ERROR
258 | fi
259 | fi
260 |
261 | exit $EXIT_SUCCESS
262 |
--------------------------------------------------------------------------------
/latex/debian-wheezy.Dockerfile:
--------------------------------------------------------------------------------
1 | FROM debian:wheezy
2 | # texlive 2012
3 |
4 | # Build-time metadata as defined at http://label-schema.org
5 | ARG BUILD_DATE
6 | ARG VCS_REF
7 |
8 | LABEL maintainer="Fabian Raab " \
9 | texlive_version="2012" \
10 | org.label-schema.build-date=$BUILD_DATE \
11 | org.label-schema.name="dockertex-latex" \
12 | org.label-schema.description="🐋📓 Latex with multiple texlive versions and proper command line tools 🎈 suitable for CI" \
13 | org.label-schema.url="https://github.com/raabf/dockertex.git" \
14 | org.label-schema.vcs-ref=$VCS_REF \
15 | org.label-schema.vcs-url="https://github.com/raabf/dockertex.git" \
16 | org.label-schema.docker.cmd="dockertex" \
17 | org.label-schema.docker.cmd.help="dockertex --help" \
18 | org.label-schema.usage="https://gitlab.com/raabf/dockertex/blob/master/README.md" \
19 | org.label-schema.schema-version="1.0"
20 |
21 | ENV DEBIAN_FRONTEND noninteractive
22 |
23 | # install latex
24 | # remove documentation packages of latex to save disk space
25 | RUN apt-get update && \
26 | apt-get install --quiet --yes texlive-full && \
27 | apt-get remove --quiet --yes texlive-doc-ar \
28 | texlive-doc-bg texlive-doc-de texlive-doc-en texlive-doc-cs+sk \
29 | texlive-doc-es texlive-doc-fi texlive-doc-fr texlive-doc-it texlive-doc-ja \
30 | texlive-doc-ko texlive-doc-mn texlive-doc-nl texlive-doc-pl texlive-doc-pt \
31 | texlive-doc-rs texlive-doc-ru texlive-doc-si texlive-doc-th texlive-doc-tr \
32 | texlive-doc-uk texlive-doc-vi texlive-doc-zh
33 |
34 | # install some common tools used with latex
35 | RUN apt-get install --quiet --yes \
36 | wget lsb-release biber \
37 | python-pygments gnuplot inkscape pandoc \
38 | make git && \
39 | apt-get clean && \
40 | rm -rf /var/lib/apt/lists/* && \
41 | rm -rf /tmp/*
42 |
43 |
44 | WORKDIR /home/workdir
45 |
46 | VOLUME [ "/home/workdir" ]
47 |
48 |
--------------------------------------------------------------------------------
/latex/ge-jessie.Dockerfile:
--------------------------------------------------------------------------------
1 | ARG BASE_IMAGE
2 | FROM $BASE_IMAGE
3 | # Generic Docker file for greater than ubuntu jessie (including debian).
4 |
5 | ARG TEXLIVE_VERSION
6 | ARG PACKAGES_INSTALL
7 | ARG DEBLINE
8 | # Build-time metadata as defined at http://label-schema.org
9 | ARG BUILD_DATE
10 | ARG VCS_REF
11 |
12 | LABEL maintainer="Fabian Raab " \
13 | texlive_version=$TEXLIVE_VERSION \
14 | org.label-schema.build-date=$BUILD_DATE \
15 | org.label-schema.name="dockertex-latex" \
16 | org.label-schema.description="🐋📓 Latex with multiple texlive versions and proper command line tools 🎈 suitable for CI" \
17 | org.label-schema.url="https://github.com/raabf/dockertex" \
18 | org.label-schema.vcs-ref=$VCS_REF \
19 | org.label-schema.vcs-url="https://github.com/raabf/dockertex.git" \
20 | org.label-schema.docker.cmd="dockertex" \
21 | org.label-schema.docker.cmd.help="dockertex --help" \
22 | org.label-schema.usage="https://gitlab.com/raabf/dockertex/blob/master/README.md" \
23 | org.label-schema.schema-version="1.0"
24 |
25 | ENV DEBIAN_FRONTEND noninteractive
26 |
27 | # DEBLINE will include repository for ttf-mscorefonts-installer
28 | # install latex
29 | # remove documentation packages of latex to save disk space
30 | RUN echo "$DEBLINE" >> "/etc/apt/sources.list" && \
31 | cat "/etc/apt/sources.list" && \
32 | apt-get update && \
33 | apt-get install --quiet --yes texlive-full && \
34 | apt-get remove --quiet --yes "texlive-*-doc"
35 |
36 | # install some common tools used with latex
37 | RUN echo "ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true" | debconf-set-selections && \
38 | apt-get install --quiet --yes \
39 | wget lsb-release biber \
40 | gnuplot inkscape pandoc \
41 | make git \
42 | ${PACKAGES_INSTALL} \
43 | ttf-mscorefonts-installer fonts-liberation \
44 | fonts-dejavu fonts-cmu lmodern tex-gyre && \
45 | fc-cache -f -v && \
46 | apt-get clean && \
47 | rm -rf /var/lib/apt/lists/* && \
48 | rm -rf /tmp/*
49 |
50 | WORKDIR /home/workdir
51 |
52 | VOLUME [ "/home/workdir" ]
53 |
54 |
--------------------------------------------------------------------------------
/latex/hooks/build:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | echo "--build hook called--"
4 | echo "build hook: IMAGE_NAME '$IMAGE_NAME'"
5 | echo "build hook: DOCKERFILE_PATH '$DOCKERFILE_PATH'"
6 | echo "build hook: CACHE_TAG '$CACHE_TAG'"
7 | echo "build hook: DOCKER_TAG '$DOCKER_TAG'"
8 | echo "build hook: DOCKER_REPO '$DOCKER_REPO'"
9 | echo "build hook: SOURCE_BRANCH '$SOURCE_BRANCH'"
10 | echo "build hook: SOURCE_COMMIT '$SOURCE_COMMIT'"
11 |
12 | declare -A basemap # Base image to build FROM
13 | declare -A versionmap # The installed texlive version for documentation
14 | declare -A pkgmap # Additional per distribution packages
15 | declare -A debmap # Additional repository line for apt/sources.list
16 |
17 | # For ubuntu in debmap it would be “http://archive.ubuntu.com/ubuntu/ trusty multiverse”, but it is already activated
18 | versionmap[wheezy]="2012"; basemap[wheezy]="debian:wheezy"; pkgmap[wheezy]="python-pygments"; debmap[wheezy]="deb http://deb.debian.org/debian/ wheezy contrib non-free"
19 | versionmap[trusty]="2013"; basemap[trusty]="ubuntu:trusty"; pkgmap[trusty]="python-pygments"; debmap[trusty]=""
20 | versionmap[jessie]="2014"; basemap[jessie]="debian:jessie"; pkgmap[jessie]="python-pygments"; debmap[jessie]="deb http://deb.debian.org/debian/ jessie contrib non-free"
21 | versionmap[xenial]="2015"; basemap[xenial]="ubuntu:xenial"; pkgmap[xenial]="python-pygments"; debmap[xenial]=""
22 | versionmap[stretch]="2016"; basemap[stretch]="debian:stretch"; pkgmap[stretch]="python-pygments"; debmap[stretch]="deb http://deb.debian.org/debian/ stretch contrib non-free"
23 | versionmap[bionic]="2017"; basemap[bionic]="ubuntu:bionic"; pkgmap[bionic]="python-pygments"; debmap[bionic]=""
24 | versionmap[buster]="2018"; basemap[buster]="debian:buster"; pkgmap[buster]="python3-pygments"; debmap[buster]="deb http://deb.debian.org/debian/ buster contrib non-free"
25 | versionmap[focal]="2019"; basemap[focal]="ubuntu:focal"; pkgmap[focal]="python3-pygments"; debmap[focal]=""
26 | versionmap[sid]="2020"; basemap[sid]="debian:sid"; pkgmap[sid]="python3-pygments"; debmap[sid]="deb http://deb.debian.org/debian/ unstable contrib non-free"
27 |
28 | basemap[armhf-jessie]="multiarch/debian-debootstrap:armhf-jessie"; basemap[arm64-jessie]="multiarch/debian-debootstrap:arm64-jessie";
29 | basemap[armhf-xenial]="multiarch/ubuntu-debootstrap:armhf-xenial"; basemap[arm64-xenial]="multiarch/ubuntu-debootstrap:arm64-xenial";
30 | basemap[armhf-stretch]="multiarch/debian-debootstrap:armhf-stretch"; basemap[arm64-stretch]="multiarch/debian-debootstrap:arm64-stretch";
31 | basemap[armhf-bionic]="multiarch/ubuntu-debootstrap:armhf-bionic"; basemap[arm64-bionic]="multiarch/ubuntu-debootstrap:arm64-bionic";
32 | basemap[armhf-buster]="multiarch/debian-debootstrap:armhf-buster"; basemap[arm64-buster]="multiarch/debian-debootstrap:arm64-buster";
33 | basemap[armhf-focal]="multiarch/ubuntu-debootstrap:armhf-focal"; basemap[arm64-bionic]="multiarch/ubuntu-debootstrap:arm64-focal";
34 | basemap[armhf-sid]="multiarch/debian-debootstrap:armhf-sid"; basemap[arm64-sid]="multiarch/debian-debootstrap:arm64-sid";
35 |
36 |
37 | # $IMAGE_NAME var is injected into the build so the tag is correct.
38 | docker build --build-arg BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
39 | --build-arg VCS_REF=$(git rev-parse --short HEAD) \
40 | --build-arg BASE_IMAGE="${basemap[${DOCKER_TAG}]}" \
41 | --build-arg TEXLIVE_VERSION="${versionmap[${DOCKER_TAG##*-}]}" \
42 | --build-arg PACKAGES_INSTALL="${pkgmap[${DOCKER_TAG##*-}]}" \
43 | --build-arg DEBLINE="${debmap[${DOCKER_TAG##*-}]}" \
44 | --file $DOCKERFILE_PATH --tag $IMAGE_NAME .
45 |
--------------------------------------------------------------------------------
/latex/hooks/post_push:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | echo "--post_push hook called--"
4 | echo "post_push: IMAGE_NAME '$IMAGE_NAME'"
5 | echo "post_push: DOCKERFILE_PATH '$DOCKERFILE_PATH'"
6 | echo "post_push: CACHE_TAG '$CACHE_TAG'"
7 | echo "post_push: DOCKER_TAG '$DOCKER_TAG'"
8 | echo "post_push: DOCKER_REPO '$DOCKER_REPO'"
9 | echo "post_push: SOURCE_BRANCH '$SOURCE_BRANCH'"
10 | echo "post_push: SOURCE_COMMIT '$SOURCE_COMMIT'"
11 |
12 | declare -A aliasmap
13 |
14 | aliasmap[wheezy]="texlive2012"
15 | aliasmap[trusty]="texlive2013"
16 | aliasmap[jessie]="texlive2014"
17 | aliasmap[xenial]="texlive2015"
18 | aliasmap[stretch]="texlive2016 latest"
19 | aliasmap[bionic]="texlive2017"
20 | aliasmap[buster]="texlive2018"
21 | aliasmap[focal]="texlive2019 testing"
22 | aliasmap[sid]="texlive2020"
23 |
24 | array=( $(echo ${aliasmap[${DOCKER_TAG##*-}]}) )
25 | echo "post_push: use alias list '${array[@]}'"
26 |
27 | for aliastag in ${array[@]}; do
28 |
29 | if [[ ${DOCKER_TAG%%-*} == "arm"* ]]; then
30 | # Prefix the alias tag with the architecture if not x86 (e.g armhf-texlive2017)
31 | aliastag="${DOCKER_TAG%%-*}-${aliastag}"
32 | fi
33 |
34 | echo "post_push: tag and push '$DOCKER_REPO:$aliastag'"
35 | docker tag $IMAGE_NAME $DOCKER_REPO:$aliastag
36 | docker push $DOCKER_REPO:$aliastag
37 |
38 | done
39 |
40 |
--------------------------------------------------------------------------------
/latex/hooks/pre_build:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # needed to build multi-arch
4 | docker run --rm --privileged multiarch/qemu-user-static:register --reset
5 |
6 |
--------------------------------------------------------------------------------
/latex/scripts/build.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | echo "--build.sh called--"
4 | echo "build.sh: IMAGE_NAME '$IMAGE_NAME'"
5 | echo "build.sh: DOCKERFILE_PATH '$DOCKERFILE_PATH'"
6 | echo "build.sh: CACHE_TAG '$CACHE_TAG'"
7 | echo "build.sh: IMAGE_TAG '$IMAGE_TAG'"
8 | echo "build.sh: DOCKER_REGISTRY_DOMAIN '$DOCKER_REGISTRY_DOMAIN'"
9 | echo "build.sh: DOCKER_REGISTRY_REPO '$DOCKER_REGISTRY_REPO'"
10 | echo "build.sh: SOURCE_BRANCH '$SOURCE_BRANCH'"
11 | echo "build.sh: SOURCE_COMMIT '$SOURCE_COMMIT'"
12 | echo "build.sh: PUSH_ENABLED '$PUSH_ENABLED'"
13 |
14 | declare -A basemap # Base image to build FROM
15 | declare -A versionmap # The installed texlive version for documentation
16 | declare -A pkgmap # Additional per distribution packages
17 | declare -A debmap # Additional repository line for apt/sources.list
18 |
19 | # For ubuntu in debmap it would be “http://archive.ubuntu.com/ubuntu/ trusty multiverse”, but it is already activated
20 | versionmap[foobar]="1700"; basemap[foobar]="debian:buster"; pkgmap[foobar]="python3-pygments"; debmap[foobar]="deb http://deb.debian.org/debian/ buster contrib non-free"
21 | versionmap[wheezy]="2012"; basemap[wheezy]="debian:wheezy"; pkgmap[wheezy]="python-pygments"; debmap[wheezy]="deb http://deb.debian.org/debian/ wheezy contrib non-free"
22 | versionmap[trusty]="2013"; basemap[trusty]="ubuntu:trusty"; pkgmap[trusty]="python-pygments"; debmap[trusty]=""
23 | versionmap[jessie]="2014"; basemap[jessie]="debian:jessie"; pkgmap[jessie]="python-pygments"; debmap[jessie]="deb http://deb.debian.org/debian/ jessie contrib non-free"
24 | versionmap[xenial]="2015"; basemap[xenial]="ubuntu:xenial"; pkgmap[xenial]="python-pygments"; debmap[xenial]=""
25 | versionmap[stretch]="2016"; basemap[stretch]="debian:stretch"; pkgmap[stretch]="python-pygments"; debmap[stretch]="deb http://deb.debian.org/debian/ stretch contrib non-free"
26 | versionmap[bionic]="2017"; basemap[bionic]="ubuntu:bionic"; pkgmap[bionic]="python-pygments"; debmap[bionic]=""
27 | versionmap[buster]="2018"; basemap[buster]="debian:buster"; pkgmap[buster]="python3-pygments"; debmap[buster]="deb http://deb.debian.org/debian/ buster contrib non-free"
28 | versionmap[focal]="2019"; basemap[focal]="ubuntu:focal"; pkgmap[focal]="python3-pygments"; debmap[focal]=""
29 | versionmap[bullseye]="2020"; basemap[bullseye]="debian:bullseye"; pkgmap[bullseye]="python3-pygments"; debmap[bullseye]="deb http://deb.debian.org/debian/ bullseye contrib non-free"
30 | versionmap[jammy]="2021"; basemap[jammy]="ubuntu:jammy"; pkgmap[jammy]="python3-pygments"; debmap[jammy]=""
31 | versionmap[bookworm]="2022"; basemap[bookworm]="debian:bookworm"; pkgmap[bookworm]="python3-pygments"; debmap[bookworm]="deb http://deb.debian.org/debian/ bookworm contrib non-free"
32 |
33 | basemap[armhf-jessie]="multiarch/debian-debootstrap:armhf-jessie"; basemap[arm64-jessie]="multiarch/debian-debootstrap:arm64-jessie";
34 | basemap[armhf-xenial]="multiarch/ubuntu-debootstrap:armhf-xenial"; basemap[arm64-xenial]="multiarch/ubuntu-debootstrap:arm64-xenial";
35 | basemap[armhf-stretch]="multiarch/debian-debootstrap:armhf-stretch"; basemap[arm64-stretch]="multiarch/debian-debootstrap:arm64-stretch";
36 | basemap[armhf-bionic]="multiarch/ubuntu-debootstrap:armhf-bionic"; basemap[arm64-bionic]="multiarch/ubuntu-debootstrap:arm64-bionic";
37 | basemap[armhf-buster]="multiarch/debian-debootstrap:armhf-buster"; basemap[arm64-buster]="multiarch/debian-debootstrap:arm64-buster";
38 | basemap[armhf-focal]="multiarch/ubuntu-debootstrap:armhf-focal"; basemap[arm64-bionic]="multiarch/ubuntu-debootstrap:arm64-focal";
39 | basemap[armhf-sid]="multiarch/debian-debootstrap:armhf-sid"; basemap[arm64-sid]="multiarch/debian-debootstrap:arm64-sid";
40 |
41 | DOCKER_REGISTRY_IMAGE_NAME="${DOCKER_REGISTRY_REPO:+${DOCKER_REGISTRY_DOMAIN:-docker.io}/$DOCKER_REGISTRY_REPO}"
42 | FINAL_IMAGE_NAME=${IMAGE_NAME:-${DOCKER_REGISTRY_IMAGE_NAME:-latex}}
43 | echo "build.sh: FINAL_IMAGE_NAME '$FINAL_IMAGE_NAME'"
44 |
45 | # $IMAGE_NAME var is injected into the build so the tag is correct.
46 | docker build --build-arg BUILD_DATE="$(date -u +"%Y-%m-%dT%H:%M:%SZ")" \
47 | --build-arg VCS_REF="$(git rev-parse --short HEAD)" \
48 | --build-arg BASE_IMAGE="${basemap[${IMAGE_TAG}]}" \
49 | --build-arg TEXLIVE_VERSION="${versionmap[${IMAGE_TAG##*-}]}" \
50 | --build-arg PACKAGES_INSTALL="${pkgmap[${IMAGE_TAG##*-}]}" \
51 | --build-arg DEBLINE="${debmap[${IMAGE_TAG##*-}]}" \
52 | --file "$DOCKERFILE_PATH" --tag "$FINAL_IMAGE_NAME:$IMAGE_TAG" . || exit $?
53 |
54 | if [[ "$PUSH_ENABLED" == 'true' ]]; then
55 | docker push "$FINAL_IMAGE_NAME:$IMAGE_TAG" || exit $?
56 | fi
--------------------------------------------------------------------------------
/latex/scripts/tag_alias.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | echo "--tag_alias.sh script called--"
4 | echo "tag_alias.sh: IMAGE_NAME '$IMAGE_NAME'"
5 | echo "tag_alias.sh: DOCKERFILE_PATH '$DOCKERFILE_PATH'"
6 | echo "tag_alias.sh: CACHE_TAG '$CACHE_TAG'"
7 | echo "tag_alias.sh: IMAGE_TAG '$IMAGE_TAG'"
8 | echo "tag_alias.sh: DOCKER_REGISTRY_DOMAIN '$DOCKER_REGISTRY_DOMAIN'"
9 | echo "tag_alias.sh: DOCKER_REGISTRY_REPO '$DOCKER_REGISTRY_REPO'"
10 | echo "tag_alias.sh: SOURCE_BRANCH '$SOURCE_BRANCH'"
11 | echo "tag_alias.sh: SOURCE_COMMIT '$SOURCE_COMMIT'"
12 | echo "tag_alias.sh: PUSH_ENABLED '$PUSH_ENABLED'"
13 |
14 | declare -A aliasmap
15 |
16 | aliasmap[foobar]="texlive1700"
17 | aliasmap[wheezy]="texlive2012"
18 | aliasmap[trusty]="texlive2013"
19 | aliasmap[jessie]="texlive2014"
20 | aliasmap[xenial]="texlive2015"
21 | aliasmap[stretch]="texlive2016"
22 | aliasmap[bionic]="texlive2017"
23 | aliasmap[buster]="texlive2018"
24 | aliasmap[focal]="texlive2019"
25 | aliasmap[bullseye]="texlive2020"
26 | aliasmap[jammy]="texlive2021 latest"
27 | aliasmap[bookworm]="texlive2022 testing"
28 |
29 |
30 | mapfile -t array < <(echo "${aliasmap[${IMAGE_TAG##*-}]}")
31 | echo "tag_alias.sh: use alias list '${array[@]}'"
32 |
33 | DOCKER_REGISTRY_IMAGE_NAME="${DOCKER_REGISTRY_REPO:+${DOCKER_REGISTRY_DOMAIN:-docker.io}/$DOCKER_REGISTRY_REPO}"
34 | FINAL_IMAGE_NAME=${IMAGE_NAME:-${DOCKER_REGISTRY_IMAGE_NAME:-latex}}
35 | echo "tag_alias.sh: FINAL_IMAGE_NAME '$FINAL_IMAGE_NAME'"
36 |
37 | for aliastag in ${array[@]}; do
38 |
39 | if [[ ${IMAGE_TAG%%-*} == "arm"* ]]; then
40 | # Prefix the alias tag with the architecture if not x86 (e.g armhf-texlive2017)
41 | aliastag="${IMAGE_TAG%%-*}-${aliastag}"
42 | fi
43 |
44 |
45 | echo "tag_alias.sh: tag '$FINAL_IMAGE_NAME:$aliastag'"
46 | docker tag "$FINAL_IMAGE_NAME:$IMAGE_TAG" "$FINAL_IMAGE_NAME:$aliastag" || exit $?
47 |
48 | if [[ "$PUSH_ENABLED" == 'true' ]]; then
49 | echo "tag_alias.sh: push '$FINAL_IMAGE_NAME:$aliastag'"
50 | docker push $FINAL_IMAGE_NAME:$aliastag || exit $?
51 | fi
52 |
53 | done
54 |
55 |
--------------------------------------------------------------------------------
/latex/ubuntu-trusty.Dockerfile:
--------------------------------------------------------------------------------
1 | FROM ubuntu:trusty
2 | # texlive 2013
3 |
4 | # Build-time metadata as defined at http://label-schema.org
5 | ARG BUILD_DATE
6 | ARG VCS_REF
7 |
8 | LABEL maintainer="Fabian Raab " \
9 | texlive_version="2013" \
10 | org.label-schema.build-date=$BUILD_DATE \
11 | org.label-schema.name="dockertex-latex" \
12 | org.label-schema.description="🐋📓 Latex with multiple texlive versions and proper command line tools 🎈 suitable for CI" \
13 | org.label-schema.url="https://github.com/raabf/dockertex.git" \
14 | org.label-schema.vcs-ref=$VCS_REF \
15 | org.label-schema.vcs-url="https://github.com/raabf/dockertex.git" \
16 | org.label-schema.docker.cmd="dockertex" \
17 | org.label-schema.docker.cmd.help="dockertex --help" \
18 | org.label-schema.usage="https://gitlab.com/raabf/dockertex/blob/master/README.md" \
19 | org.label-schema.schema-version="1.0"
20 |
21 | ENV DEBIAN_FRONTEND noninteractive
22 |
23 | # install latex
24 | # remove documentation packages of latex to save disk space
25 | RUN apt-get update && \
26 | apt-get install --quiet --yes texlive-full && \
27 | apt-get remove --quiet --yes "texlive-*-doc"
28 | # probably do not select all packages like expected. Not sure why. However image is quite small in this old version.
29 |
30 | # install some common tools used with latex
31 | RUN apt-get install --quiet --yes \
32 | wget lsb-release biber \
33 | python-pygments gnuplot inkscape pandoc \
34 | make git && \
35 | apt-get clean && \
36 | rm -rf /var/lib/apt/lists/* && \
37 | rm -rf /tmp/*
38 |
39 |
40 | WORKDIR /home/workdir
41 |
42 | VOLUME [ "/home/workdir" ]
43 |
44 |
--------------------------------------------------------------------------------
/misc/dockertexstudio.desktop:
--------------------------------------------------------------------------------
1 | [Desktop Entry]
2 | Categories=Office;Publishing;Qt;X-SuSE-Core-Office;X-Mandriva-Office-Publishing;X-Misc;
3 | Encoding=UTF-8
4 | GenericName=LaTeX editor (docker container)
5 | GenericName[fr]=Editeur LaTeX (docker container)
6 | GenericName[de]=LaTeX Editor (docker container)
7 | Comment=LaTeX development environment
8 | Comment[fr]=Environnement de développement LaTeX
9 | Comment[de]=LaTeX Entwicklungsumgebung
10 | Keywords=LaTeX;TeX;editor;
11 | MimeType=text/x-tex;
12 | StartupNotify=false
13 | Terminal=false
14 | Type=Application
15 |
16 | # In order to work, those two properties have to be set!
17 | #Name=Docker TeXstudio
18 | #Icon=texstudio
19 | #Exec=dockertexstudio %F
20 |
--------------------------------------------------------------------------------
/misc/icons/hicolor/16x16/apps/texstudio.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/misc/pictures/gitlab_ci_artifacts.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raabf/dockertex/4c0465ec5c01a148407fcbd60f716fc22c7ef0f9/misc/pictures/gitlab_ci_artifacts.jpg
--------------------------------------------------------------------------------
/posthook.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #############################################################
3 | ## Title: docketex posthook
4 | ## Abstact: installs texstudio menu entry in user home
5 | ## Author: Fabian Raab
6 | ## Dependencies: docker
7 | ## Creation Date: 2017-11-02
8 | ## Last Edit: 2017-11-05
9 | ##############################################################
10 |
11 |
12 | SCRIPTNAME=$(basename $0)
13 | SCRIPTPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
14 | EXIT_SUCCESS=0
15 | EXIT_FAILURE=1
16 | EXIT_ERROR=2
17 | EXIT_BUG=10
18 |
19 | icon_prefix="$HOME/.local/share/icons"
20 | applications_prefix="$HOME/.local/share/applications"
21 | volumes=""
22 |
23 | ##### Colors #####
24 | RCol='\e[0m' # Text Reset
25 |
26 | # Regular Bold Underline High Intensity BoldHigh Intens Background High Intensity Backgrounds
27 | Bla='\e[0;30m'; BBla='\e[1;30m'; UBla='\e[4;30m'; IBla='\e[0;90m'; BIBla='\e[1;90m'; On_Bla='\e[40m'; On_IBla='\e[0;100m';
28 | Red='\e[0;31m'; BRed='\e[1;31m'; URed='\e[4;31m'; IRed='\e[0;91m'; BIRed='\e[1;91m'; On_Red='\e[41m'; On_IRed='\e[0;101m';
29 | Gre='\e[0;32m'; BGre='\e[1;32m'; UGre='\e[4;32m'; IGre='\e[0;92m'; BIGre='\e[1;92m'; On_Gre='\e[42m'; On_IGre='\e[0;102m';
30 | Yel='\e[0;33m'; BYel='\e[1;33m'; UYel='\e[4;33m'; IYel='\e[0;93m'; BIYel='\e[1;93m'; On_Yel='\e[43m'; On_IYel='\e[0;103m';
31 | Blu='\e[0;34m'; BBlu='\e[1;34m'; UBlu='\e[4;34m'; IBlu='\e[0;94m'; BIBlu='\e[1;94m'; On_Blu='\e[44m'; On_IBlu='\e[0;104m';
32 | Pur='\e[0;35m'; BPur='\e[1;35m'; UPur='\e[4;35m'; IPur='\e[0;95m'; BIPur='\e[1;95m'; On_Pur='\e[45m'; On_IPur='\e[0;105m';
33 | Cya='\e[0;36m'; BCya='\e[1;36m'; UCya='\e[4;36m'; ICya='\e[0;96m'; BICya='\e[1;96m'; On_Cya='\e[46m'; On_ICya='\e[0;106m';
34 | Whi='\e[0;37m'; BWhi='\e[1;37m'; UWhi='\e[4;37m'; IWhi='\e[0;97m'; BIWhi='\e[1;97m'; On_Whi='\e[47m'; On_IWhi='\e[0;107m';
35 |
36 |
37 | ###### Functions ######
38 |
39 | function usage #(exit_code: Optional)
40 | {
41 | echo -e "Usage: ${Yel}$SCRIPTNAME${RCol} ${Blu}--menu-tag ${UGre}tagname${RCol} [${Blu}--menu-volume ${UGre}mapping${RCol}]* ${Blu}--icon-prefix ${UGre}icons dir${RCol}] [${Blu}--app-prefix ${UGre}applications dir${RCol}]
42 | ${Yel}$SCRIPTNAME${RCol} [${Blu}-h|--help${RCol}]
43 |
44 | Installs texstudio menu entry in user home or in the specifed directories.
45 |
46 | ${BRed}OPTIONS:${RCol}
47 | ${Blu}-h, --help${RCol}
48 | Print this help and exit.
49 |
50 | ${Blu}--menu-tag ${UGre}tagname${RCol}
51 | Installs a menu entry, which starts texstudio in the texstudio
52 | docker-container with tag ${UGre}tagname${RCol}.
53 |
54 | ${Blu}--menu-volume ${UGre}mapping${RCol}
55 | Mounts an additional volume into the docker-container which is
56 | launched by the menu entry. The syntax of ${UGre}mapping${RCol} is the same as
57 | in ${Blu}docker run${RCol}. This option can be repeated.
58 | '=' can be used as an alternative for the ':' sperator (intended as
59 | workaround for a zplug which prevents the usage of ':' in hooks).
60 |
61 | ${Blu}--icon-prefix ${UGre}icons dir${RCol}
62 | The script copies the texstudio icon to ${UGre}icons dir${RCol}.
63 | Defaults to $icon_prefix/.
64 |
65 | ${Blu}--app-prefix ${UGre}applications dir${RCol}
66 | The script copies the texstudio menu entry (.desktop) to
67 | ${UGre}applications dir${RCol}. Defaults to $applications_prefix/.
68 |
69 | ${BRed}EXIT STATUS:${RCol}
70 | If everything is successfull the script will exit with $EXIT_SUCCESS.
71 | Failure exit statuses are $EXIT_FAILURE, $EXIT_ERROR, and $EXIT_BUG.
72 | "
73 | [[ $# -eq 1 ]] && exit $1 || exit $EXIT_FAILURE
74 | }
75 |
76 |
77 | ###### Parse Options ######
78 |
79 | # first ':' prevents getopts error messages
80 | optspec=':t:h-:'
81 |
82 | while getopts "$optspec" OPTION ; do
83 | case $OPTION in
84 | -)
85 | case "${OPTARG}" in
86 | help)
87 | usage $EXIT_SUCCESS
88 | ;;
89 | icon-prefix)
90 | icon_prefix="${!OPTIND}"; OPTIND=$(( $OPTIND + 1 ))
91 | ;;
92 | app-prefix)
93 | applications_prefix="${!OPTIND}"; OPTIND=$(( $OPTIND + 1 ))
94 | ;;
95 | menu-tag)
96 | menu_tag="${!OPTIND}"; OPTIND=$(( $OPTIND + 1 ))
97 | ;;
98 | menu-volume)
99 | # '=' is an alternative seperator for ':' (workaround for zplug hook bug)
100 | volumes_colon="$(echo "${!OPTIND}" | tr = :)"
101 | # check if both sides of : have a value
102 | IFS=':' arr=($volumes_colon); unset IFS
103 | if [ "${#arr[@]}" -lt "2" ] || [ -z "${arr[0]}" ] || [ -z "${arr[1]}" ]; then
104 | echo -e "${Blu}--menu-volume ${volumes_colon}${Red} is malformed.${RCol}" >&2
105 | exit $EXIT_FAILURE
106 | fi
107 | volumes="$volumes --volume ${volumes_colon}"; OPTIND=$(( $OPTIND + 1 ))
108 | ;;
109 | *)
110 | if [ "$OPTERR" = 1 ] && [ "${optspec:0:1}" == ":" ]; then
111 | echo -e "${Red}Unknown option ${Blu}--$OPTARG${Red}.${RCol}" >&2
112 | echo -e ""
113 | usage $EXIT_FAILURE
114 | fi
115 | ;;
116 | esac
117 | ;;
118 | h)
119 | usage $EXIT_SUCCESS
120 | ;;
121 | \?)
122 | echo -e "${Red}Unknown option ${Blu}-$OPTARG\"${Red}.${RCol}" >&2
123 | echo -e ""
124 | usage $EXIT_ERROR
125 | ;;
126 | :) echo -e "${Red}Option ${Blu}-$OPTARG${Red} needs an argument.${RCol}" >&2
127 | echo -e ""
128 | usage $EXIT_ERROR
129 | ;;
130 | *) echo -e "${Red}ERROR: This should not happen.${RCol}" >&2
131 | echo -e ""
132 | usage $EXIT_BUG
133 | ;;
134 | esac
135 | done
136 |
137 | # jump over consumed arguments
138 | shift $(( OPTIND - 1 ))
139 |
140 | ####### Commands ######
141 |
142 | if [ -z $menu_tag ]; then
143 | echo -e "${Red}${Blu}--menu-tag${Red} was omitted. Please specify a ${UGre}tagname${Red}.${RCol}" >&2
144 | exit $EXIT_FAILURE
145 | fi
146 |
147 | mkdir --parents "$icon_prefix" || exit $EXIT_ERROR
148 | mkdir --parents "$applications_prefix" || exit $EXIT_ERROR
149 |
150 | cp --recursive --no-target-directory \
151 | "$SCRIPTPATH/misc/icons/" \
152 | "$icon_prefix" || exit $EXIT_ERROR
153 |
154 | desktop_file="$applications_prefix/dockertexstudio-$menu_tag.desktop"
155 |
156 | cp "$SCRIPTPATH/misc/dockertexstudio.desktop" \
157 | "$desktop_file" || exit $EXIT_ERROR
158 | chmod a-x "$desktop_file" || exit $EXIT_ERROR
159 |
160 | echo "Name=Docker TexStudio ($menu_tag)" >> "$desktop_file" || exit $EXIT_ERROR
161 | echo "Exec=$SCRIPTPATH/bin/dockertexstudio.sh --tag $menu_tag $volumes %F" >> "$desktop_file" || exit $EXIT_ERROR
162 | #echo "Icon=texstudio" >> "$desktop_file" || exit $EXIT_ERROR
163 | echo "Icon=$icon_prefix/hicolor/scalable/apps/texstudio.svg" >> "$desktop_file" || exit $EXIT_ERROR
164 |
165 | exit $EXIT_SUCCESS
166 |
167 |
--------------------------------------------------------------------------------
/texstudio/debian-jessie.Dockerfile:
--------------------------------------------------------------------------------
1 | FROM raabf/latex-versions:jessie
2 |
3 | ARG TEXSTUDIO_VERSION_QT4
4 | ARG TEXSTUDIO_VERSION_QT5
5 | ARG TEXSTUDIO_VERSION_QT5_DEBIAN9
6 | ARG TEXSTUDIO_VERSION_QT5_DEBIAN10
7 |
8 | ENV TEXSTUDIO_VERSION=${TEXSTUDIO_VERSION_QT4}
9 | # Build-time metadata as defined at http://label-schema.org
10 | ARG BUILD_DATE
11 | ARG VCS_REF
12 |
13 | LABEL maintainer="Fabian Raab " \
14 | texlive-version="2014" \
15 | texstudio-version="$TEXSTUDIO_VERSION" \
16 | org.label-schema.build-date=$BUILD_DATE \
17 | org.label-schema.name="dockertex-texstudio" \
18 | org.label-schema.description="🐋📽 TeXstudio including Latex with multiple texlive versions and proper command line tools" \
19 | org.label-schema.url="https://github.com/raabf/dockertex.git" \
20 | org.label-schema.vcs-ref=$VCS_REF \
21 | org.label-schema.vcs-url="https://github.com/raabf/dockertex.git" \
22 | org.label-schema.docker.cmd="dockertexstudio" \
23 | org.label-schema.docker.cmd.help="dockertexstudio --help" \
24 | org.label-schema.usage="https://gitlab.com/raabf/dockertex/blob/master/README.md" \
25 | org.label-schema.schema-version="1.0"
26 |
27 | ENV DEBIAN_FRONTEND noninteractive
28 |
29 | RUN apt-get update
30 |
31 | # install texstudio
32 | # (A newer version from the developer, since the version in the
33 | # standard repository is quite old)
34 | RUN wget -O texstudio.deb "http://download.opensuse.org/repositories/home:/jsundermeyer/Debian_8.0/amd64/texstudio_${TEXSTUDIO_VERSION}_amd64.deb" && \
35 | (dpkg --install ./texstudio.deb || true) && \
36 | apt-get --fix-broken --yes --quiet install && \
37 | command -v texstudio >/dev/null 2>&1 && \
38 | rm texstudio.deb && \
39 | apt-get clean && \
40 | rm -rf /var/lib/apt/lists/* && \
41 | rm -rf /tmp/*
42 |
43 | VOLUME [ "/home/.config/texstudio" ]
44 |
45 | CMD [ "texstudio" ]
46 |
--------------------------------------------------------------------------------
/texstudio/debian-wheezy.Dockerfile:
--------------------------------------------------------------------------------
1 | FROM raabf/latex-versions:wheezy
2 |
3 | ARG TEXSTUDIO_VERSION_QT4
4 | ARG TEXSTUDIO_VERSION_QT5
5 | ARG TEXSTUDIO_VERSION_QT5_DEBIAN9
6 | ARG TEXSTUDIO_VERSION_QT5_DEBIAN10
7 |
8 | #ENV TEXSTUDIO_VERSION=${TEXSTUDIO_VERSION_QT4}
9 | # The last version TexStudio provides for wheezy
10 | ENV TEXSTUDIO_VERSION="2.12.10-2"
11 |
12 | # Build-time metadata as defined at http://label-schema.org
13 | ARG BUILD_DATE
14 | ARG VCS_REF
15 |
16 | LABEL maintainer="Fabian Raab " \
17 | texlive-version="2012" \
18 | texstudio-version="$TEXSTUDIO_VERSION" \
19 | org.label-schema.build-date=$BUILD_DATE \
20 | org.label-schema.name="dockertex-texstudio" \
21 | org.label-schema.description="🐋📽 TeXstudio including Latex with multiple texlive versions and proper command line tools" \
22 | org.label-schema.url="https://github.com/raabf/dockertex.git" \
23 | org.label-schema.vcs-ref=$VCS_REF \
24 | org.label-schema.vcs-url="https://github.com/raabf/dockertex.git" \
25 | org.label-schema.docker.cmd="dockertexstudio" \
26 | org.label-schema.docker.cmd.help="dockertexstudio --help" \
27 | org.label-schema.usage="https://gitlab.com/raabf/dockertex/blob/master/README.md" \
28 | org.label-schema.schema-version="1.0"
29 |
30 | ENV DEBIAN_FRONTEND noninteractive
31 |
32 | RUN apt-get update
33 |
34 | # install texstudio
35 | # (A newer version from the developer, since the version in the
36 | # standard repository is quite old)
37 | RUN wget -O texstudio.deb "http://download.opensuse.org/repositories/home:/jsundermeyer/Debian_7.0/amd64/texstudio-qt4_${TEXSTUDIO_VERSION}_amd64.deb" && \
38 | (dpkg --install ./texstudio.deb || true) && \
39 | apt-get --fix-broken --yes --quiet install && \
40 | command -v texstudio >/dev/null 2>&1 && \
41 | rm texstudio.deb && \
42 | apt-get clean && \
43 | rm -rf /var/lib/apt/lists/* && \
44 | rm -rf /tmp/*
45 |
46 | VOLUME [ "/home/.config/texstudio" ]
47 |
48 | CMD [ "texstudio" ]
49 |
--------------------------------------------------------------------------------
/texstudio/env_file_all:
--------------------------------------------------------------------------------
1 | TEXSTUDIO_VERSION_QT4="2.12.22-1"
2 | TEXSTUDIO_VERSION_QT5="4.2.3-1+8.1"
3 | TEXSTUDIO_VERSION_QT5_DEBIAN9="3.1.2-1+4.1"
4 | TEXSTUDIO_VERSION_QT5_DEBIAN10="4.2.3-1+8.1"
5 |
--------------------------------------------------------------------------------
/texstudio/ge-stretch.Dockerfile:
--------------------------------------------------------------------------------
1 | ARG BASE_IMAGE
2 | FROM $BASE_IMAGE
3 |
4 | ARG TEXSTUDIO_VERSION_QT4
5 | ARG TEXSTUDIO_VERSION_QT5
6 | ARG TEXSTUDIO_VERSION_QT5_DEBIAN9
7 | ARG TEXSTUDIO_VERSION_QT5_DEBIAN10
8 |
9 | ARG TEXLIVE_VERSION
10 | ARG FULL_URL
11 | ARG TEXSTUDIO_VERSION
12 | ARG TEXSTUDIO_FILENAME
13 |
14 | # Build-time metadata as defined at http://label-schema.org
15 | ARG BUILD_DATE
16 | ARG VCS_REF
17 |
18 | LABEL maintainer="Fabian Raab " \
19 | texlive-version="$TEXLIVE_VERSION" \
20 | texstudio-version="$TEXSTUDIO_VERSION" \
21 | texstudio-filename="$TEXSTUDIO_FILENAME" \
22 | org.label-schema.build-date="$BUILD_DATE" \
23 | org.label-schema.name="dockertex-texstudio" \
24 | org.label-schema.description="🐋📽 TeXstudio including Latex with multiple texlive versions and proper command line tools" \
25 | org.label-schema.url="https://github.com/raabf/dockertex.git" \
26 | org.label-schema.vcs-ref=$VCS_REF \
27 | org.label-schema.vcs-url="https://github.com/raabf/dockertex.git" \
28 | org.label-schema.docker.cmd="dockertexstudio" \
29 | org.label-schema.docker.cmd.help="dockertexstudio --help" \
30 | org.label-schema.usage="https://gitlab.com/raabf/dockertex/blob/master/README.md" \
31 | org.label-schema.schema-version="1.0"
32 |
33 | ENV DEBIAN_FRONTEND noninteractive
34 |
35 | # for the modern KDE Plasma look (configurable in texstudio options)
36 | # xauth: authenticate between guest and host
37 | RUN apt-get update && \
38 | apt-get install --quiet --yes xauth kde-style-breeze
39 |
40 | # install texstudio
41 | # (A newer version from the developer, since the version in the
42 | # standard repository is quite old)
43 | RUN wget -O texstudio.deb "$FULL_URL" && \
44 | apt-get install --quiet --yes ./texstudio.deb && \
45 | command -v texstudio >/dev/null 2>&1 && \
46 | rm texstudio.deb && \
47 | apt-get clean && \
48 | rm -rf /var/lib/apt/lists/* && \
49 | rm -rf /tmp/*
50 |
51 | VOLUME [ "/home/.config/texstudio" ]
52 |
53 | CMD [ "texstudio" ]
54 |
--------------------------------------------------------------------------------
/texstudio/hooks/build:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # $IMAGE_NAME var is injected into the build so the tag is correct.
4 |
5 | echo "--build hook called--"
6 | echo "build hook: IMAGE_NAME '$IMAGE_NAME'"
7 | echo "build hook: DOCKERFILE_PATH '$DOCKERFILE_PATH'"
8 | echo "build hook: CACHE_TAG '$CACHE_TAG'"
9 | echo "build hook: DOCKER_TAG '$DOCKER_TAG'"
10 | echo "build hook: DOCKER_REPO '$DOCKER_REPO'"
11 | echo "build hook: SOURCE_BRANCH '$SOURCE_BRANCH'"
12 | echo "build hook: SOURCE_COMMIT '$SOURCE_COMMIT'"
13 |
14 | . "$(dirname "$DOCKERFILE_PATH")/env_file_all"
15 | echo "build hook: TEXSTUDIO_VERSION_QT4 '$TEXSTUDIO_VERSION_QT4'"
16 | echo "build hook: TEXSTUDIO_VERSION_QT5 '$TEXSTUDIO_VERSION_QT5'"
17 | echo "build hook: TEXSTUDIO_VERSION_QT5_DEBIAN9 '$TEXSTUDIO_VERSION_QT5_DEBIAN9'"
18 | echo "build hook: TEXSTUDIO_VERSION_QT5_DEBIAN10 '$TEXSTUDIO_VERSION_QT5_DEBIAN10'"
19 |
20 | docker build --build-arg BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
21 | --build-arg VCS_REF=$(git rev-parse --short HEAD) \
22 | --build-arg TEXSTUDIO_VERSION_QT4="$TEXSTUDIO_VERSION_QT4" \
23 | --build-arg TEXSTUDIO_VERSION_QT5="$TEXSTUDIO_VERSION_QT5" \
24 | --build-arg TEXSTUDIO_VERSION_QT5_DEBIAN9="$TEXSTUDIO_VERSION_QT5_DEBIAN9" \
25 | --build-arg TEXSTUDIO_VERSION_QT5_DEBIAN10="$TEXSTUDIO_VERSION_QT5_DEBIAN10" \
26 | -f "$DOCKERFILE_PATH" -t $IMAGE_NAME .
27 |
28 |
--------------------------------------------------------------------------------
/texstudio/hooks/post_push:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | echo "--post_push hook called--"
4 | echo "post_push: IMAGE_NAME '$IMAGE_NAME'"
5 | echo "post_push: DOCKERFILE_PATH '$DOCKERFILE_PATH'"
6 | echo "post_push: CACHE_TAG '$CACHE_TAG'"
7 | echo "post_push: DOCKER_TAG '$DOCKER_TAG'"
8 | echo "post_push: DOCKER_REPO '$DOCKER_REPO'"
9 | echo "post_push: SOURCE_BRANCH '$SOURCE_BRANCH'"
10 | echo "post_push: SOURCE_COMMIT '$SOURCE_COMMIT'"
11 |
12 | declare -A aliasmap
13 |
14 | aliasmap[wheezy]="texlive2012"
15 | aliasmap[trusty]="texlive2013"
16 | aliasmap[jessie]="texlive2014"
17 | aliasmap[xenial]="texlive2015"
18 | aliasmap[stretch]="texlive2016 latest"
19 | aliasmap[bionic]="texlive2017"
20 | aliasmap[buster]="texlive2018 testing"
21 | aliasmap[sid]="texlive2019"
22 |
23 |
24 | array=( $(echo ${aliasmap[$DOCKER_TAG]}) )
25 | echo "post_push: use alias list '${aliasmap[$DOCKER_TAG]}'"
26 |
27 | for aliastag in ${array[@]}; do
28 |
29 | echo "post_push: tag and push '$aliastag'"
30 | docker tag $IMAGE_NAME $DOCKER_REPO:$aliastag
31 | docker push $DOCKER_REPO:$aliastag
32 |
33 | done
34 |
35 |
--------------------------------------------------------------------------------
/texstudio/scripts/build.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # $IMAGE_NAME var is injected into the build so the tag is correct.
4 |
5 | echo "--build.sh hook called--"
6 | echo "build.sh: IMAGE_NAME '$IMAGE_NAME'"
7 | echo "build.sh: DOCKERFILE_PATH '$DOCKERFILE_PATH'"
8 | echo "build.sh: CACHE_TAG '$CACHE_TAG'"
9 | echo "build.sh: IMAGE_TAG '$IMAGE_TAG'"
10 | echo "build.sh: DOCKER_REGISTRY_DOMAIN '$DOCKER_REGISTRY_DOMAIN'"
11 | echo "build.sh: DOCKER_REGISTRY_REPO '$DOCKER_REGISTRY_REPO'"
12 | echo "build.sh: SOURCE_BRANCH '$SOURCE_BRANCH'"
13 | echo "build.sh: SOURCE_COMMIT '$SOURCE_COMMIT'"
14 | echo "build.sh: PUSH_ENABLED '$PUSH_ENABLED'"
15 | echo "build.sh: TEXSTUDIO_VERSION '$TEXSTUDIO_VERSION'"
16 |
17 | . "$(dirname "$DOCKERFILE_PATH")/env_file_all"
18 |
19 | echo "build.sh hook: TEXSTUDIO_VERSION_QT4 '$TEXSTUDIO_VERSION_QT4'"
20 | echo "build.sh hook: TEXSTUDIO_VERSION_QT5 '$TEXSTUDIO_VERSION_QT5'"
21 | echo "build.sh hook: TEXSTUDIO_VERSION_QT5_DEBIAN9 '$TEXSTUDIO_VERSION_QT5_DEBIAN9'"
22 | echo "build.sh hook: TEXSTUDIO_VERSION_QT5_DEBIAN10 '$TEXSTUDIO_VERSION_QT5_DEBIAN10'"
23 |
24 | DOCKER_REGISTRY_IMAGE_NAME="${DOCKER_REGISTRY_REPO:+${DOCKER_REGISTRY_DOMAIN:-docker.io}/$DOCKER_REGISTRY_REPO}"
25 | FINAL_IMAGE_NAME=${IMAGE_NAME:-${DOCKER_REGISTRY_IMAGE_NAME:-texstudio}}
26 | echo "build.sh: FINAL_IMAGE_NAME '$FINAL_IMAGE_NAME'"
27 |
28 | # curl --silent http://download.opensuse.org/repositories/home:/jsundermeyer/Debian_11/amd64/ | grep -o -e "texstudio_4.2.3[^\"]*.deb" | head -n 1
29 |
30 | declare -A basemap # Base image to build FROM
31 | declare -A versionmap # The installed texlive version for documentation
32 | declare -A baseurl # The OS version specific part of the Texstudio download URL
33 |
34 | versionmap[stretch]="2016"; basemap[stretch]="raabf/latex-versions:stretch"; baseurl[stretch]="Debian_9.0/amd64"
35 | versionmap[bionic]="2017"; basemap[bionic]="raabf/latex-versions:bionic"; baseurl[bionic]="xUbuntu_18.04/amd64"
36 | versionmap[buster]="2018"; basemap[buster]="raabf/latex-versions:buster"; baseurl[buster]="Debian_10/amd64"
37 | versionmap[focal]="2019"; basemap[focal]="raabf/latex-versions:focal"; baseurl[focal]="xUbuntu_20.04/amd64"
38 | versionmap[bullseye]="2020"; basemap[bullseye]="raabf/latex-versions:bullseye"; baseurl[bullseye]="Debian_11/amd64"
39 | versionmap[jammy]="2021"; basemap[jammy]="raabf/latex-versions:jammy"; baseurl[jammy]="xUbuntu_21.10/amd64" # TODO change to xUbuntu_22.04/amd64/ (21.10 is impish)
40 | versionmap[bookworm]="2022"; basemap[bookworm]="raabf/latex-versions:bookworm"; baseurl[bookworm]="Debian_Testing/amd64"
41 |
42 | URL_PREFIX="http://download.opensuse.org/repositories/home:/jsundermeyer"
43 |
44 | filename="$(curl --silent ${URL_PREFIX}/${baseurl[${IMAGE_TAG##*-}]}/ | grep -o -e "texstudio_${TEXSTUDIO_VERSION}[^\"]*.deb" | head -n 1)"
45 | echo "Found file name on ${URL_PREFIX}/${baseurl[${IMAGE_TAG##*-}]}/ : ${filename}"
46 |
47 | full_url="${URL_PREFIX}/${baseurl[${IMAGE_TAG##*-}]}/${filename}"
48 | echo "Set full download URL to: ${full_url}"
49 |
50 | docker build --build-arg BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
51 | --build-arg VCS_REF=$(git rev-parse --short HEAD) \
52 | --build-arg TEXLIVE_VERSION="${versionmap[${IMAGE_TAG##*-}]}" \
53 | --build-arg TEXSTUDIO_VERSION="${TEXSTUDIO_VERSION}" \
54 | --build-arg TEXSTUDIO_FILENAME="${filename}" \
55 | --build-arg BASE_IMAGE="${basemap[${IMAGE_TAG}]}" \
56 | --build-arg FULL_URL="${full_url}" \
57 | --build-arg TEXSTUDIO_VERSION_QT4="$TEXSTUDIO_VERSION_QT4" \
58 | --build-arg TEXSTUDIO_VERSION_QT5="$TEXSTUDIO_VERSION_QT5" \
59 | --build-arg TEXSTUDIO_VERSION_QT5_DEBIAN9="$TEXSTUDIO_VERSION_QT5_DEBIAN9" \
60 | --build-arg TEXSTUDIO_VERSION_QT5_DEBIAN10="$TEXSTUDIO_VERSION_QT5_DEBIAN10" \
61 | --file "$DOCKERFILE_PATH" --tag "$FINAL_IMAGE_NAME:$IMAGE_TAG" . || exit $?
62 |
63 | if [[ "$PUSH_ENABLED" == 'true' ]]; then
64 | docker push "$FINAL_IMAGE_NAME:$IMAGE_TAG" || exit $?
65 | fi
66 |
--------------------------------------------------------------------------------
/texstudio/scripts/tag_alias.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | echo "--tag_alias.sh hook called--"
4 | echo "tag_alias.sh: IMAGE_NAME '$IMAGE_NAME'"
5 | echo "tag_alias.sh: DOCKERFILE_PATH '$DOCKERFILE_PATH'"
6 | echo "tag_alias.sh: CACHE_TAG '$CACHE_TAG'"
7 | echo "tag_alias.sh: IMAGE_TAG '$IMAGE_TAG'"
8 | echo "tag_alias.sh: DOCKER_REGISTRY_DOMAIN '$DOCKER_REGISTRY_DOMAIN'"
9 | echo "tag_alias.sh: DOCKER_REGISTRY_REPO '$DOCKER_REGISTRY_REPO'"
10 | echo "tag_alias.sh: SOURCE_BRANCH '$SOURCE_BRANCH'"
11 | echo "tag_alias.sh: SOURCE_COMMIT '$SOURCE_COMMIT'"
12 | echo "tag_alias.sh: PUSH_ENABLED '$PUSH_ENABLED'"
13 |
14 | declare -A aliasmap
15 |
16 | aliasmap[foobar]="texlive1700"
17 | aliasmap[wheezy]="texlive2012"
18 | aliasmap[trusty]="texlive2013"
19 | aliasmap[jessie]="texlive2014"
20 | aliasmap[xenial]="texlive2015"
21 | aliasmap[stretch]="texlive2016"
22 | aliasmap[bionic]="texlive2017"
23 | aliasmap[buster]="texlive2018"
24 | aliasmap[focal]="texlive2019"
25 | aliasmap[bullseye]="texlive2020"
26 | aliasmap[jammy]="texlive2021 latest"
27 | aliasmap[bookworm]="texlive2022 testing"
28 |
29 | mapfile -t array < <(echo "${aliasmap[${IMAGE_TAG##*-}]}")
30 | echo "tag_alias.sh: use alias list '${array[@]}'"
31 |
32 | DOCKER_REGISTRY_IMAGE_NAME="${DOCKER_REGISTRY_REPO:+${DOCKER_REGISTRY_DOMAIN:-docker.io}/$DOCKER_REGISTRY_REPO}"
33 | FINAL_IMAGE_NAME=${IMAGE_NAME:-${DOCKER_REGISTRY_IMAGE_NAME:-texstudio}}
34 | echo "tag_alias.sh: FINAL_IMAGE_NAME '$FINAL_IMAGE_NAME'"
35 |
36 | for aliastag in ${array[@]}; do
37 |
38 | echo "tag_alias.sh: tag '$FINAL_IMAGE_NAME:$aliastag'"
39 | docker tag "$FINAL_IMAGE_NAME:$IMAGE_TAG" "$FINAL_IMAGE_NAME:$aliastag" || exit $?
40 |
41 | if [[ "$PUSH_ENABLED" == 'true' ]]; then
42 | echo "tag_alias.sh: push '$FINAL_IMAGE_NAME:$aliastag'"
43 | docker push $FINAL_IMAGE_NAME:$aliastag || exit $?
44 | fi
45 |
46 | done
47 |
48 |
--------------------------------------------------------------------------------
/texstudio/ubuntu-trusty.Dockerfile:
--------------------------------------------------------------------------------
1 | FROM raabf/latex-versions:trusty
2 |
3 | ARG TEXSTUDIO_VERSION_QT4
4 | ARG TEXSTUDIO_VERSION_QT5
5 | ARG TEXSTUDIO_VERSION_QT5_DEBIAN9
6 | ARG TEXSTUDIO_VERSION_QT5_DEBIAN10
7 |
8 | ENV TEXSTUDIO_VERSION=${TEXSTUDIO_VERSION_QT5}
9 | # Build-time metadata as defined at http://label-schema.org
10 | ARG BUILD_DATE
11 | ARG VCS_REF
12 |
13 | LABEL maintainer="Fabian Raab " \
14 | texlive-version="2013" \
15 | texstudio-version="$TEXSTUDIO_VERSION" \
16 | org.label-schema.build-date=$BUILD_DATE \
17 | org.label-schema.name="dockertex-texstudio" \
18 | org.label-schema.description="🐋📽 TeXstudio including Latex with multiple texlive versions and proper command line tools" \
19 | org.label-schema.url="https://github.com/raabf/dockertex.git" \
20 | org.label-schema.vcs-ref=$VCS_REF \
21 | org.label-schema.vcs-url="https://github.com/raabf/dockertex.git" \
22 | org.label-schema.docker.cmd="dockertexstudio" \
23 | org.label-schema.docker.cmd.help="dockertexstudio --help" \
24 | org.label-schema.usage="https://gitlab.com/raabf/dockertex/blob/master/README.md" \
25 | org.label-schema.schema-version="1.0"
26 |
27 | ENV DEBIAN_FRONTEND noninteractive
28 |
29 | RUN apt-get update
30 |
31 | # install texstudio
32 | # (A newer version from the developer, since the version in the
33 | # standard repository is quite old)
34 | RUN wget -O texstudio.deb "http://download.opensuse.org/repositories/home:/jsundermeyer/xUbuntu_14.04/amd64/texstudio_${TEXSTUDIO_VERSION}_amd64.deb" && \
35 | (dpkg --install ./texstudio.deb || true) && \
36 | apt-get --fix-broken --yes --quiet install && \
37 | command -v texstudio >/dev/null 2>&1 && \
38 | rm texstudio.deb && \
39 | apt-get clean && \
40 | rm -rf /var/lib/apt/lists/* && \
41 | rm -rf /tmp/*
42 |
43 | VOLUME [ "/home/.config/texstudio" ]
44 |
45 | CMD [ "texstudio" ]
46 |
--------------------------------------------------------------------------------
/texstudio/ubuntu-xenial.Dockerfile:
--------------------------------------------------------------------------------
1 | FROM raabf/latex-versions:xenial
2 |
3 | ARG TEXSTUDIO_VERSION_QT4
4 | ARG TEXSTUDIO_VERSION_QT5
5 | ARG TEXSTUDIO_VERSION_QT5_DEBIAN9
6 | ARG TEXSTUDIO_VERSION_QT5_DEBIAN10
7 |
8 | ENV TEXSTUDIO_VERSION=${TEXSTUDIO_VERSION_QT5}
9 | # Build-time metadata as defined at http://label-schema.org
10 | ARG BUILD_DATE
11 | ARG VCS_REF
12 |
13 | LABEL maintainer="Fabian Raab " \
14 | texlive-version="2015" \
15 | texstudio-version="$TEXSTUDIO_VERSION" \
16 | org.label-schema.build-date=$BUILD_DATE \
17 | org.label-schema.name="dockertex-texstudio" \
18 | org.label-schema.description="🐋📽 TeXstudio including Latex with multiple texlive versions and proper command line tools" \
19 | org.label-schema.url="https://github.com/raabf/dockertex.git" \
20 | org.label-schema.vcs-ref=$VCS_REF \
21 | org.label-schema.vcs-url="https://github.com/raabf/dockertex.git" \
22 | org.label-schema.docker.cmd="dockertexstudio" \
23 | org.label-schema.docker.cmd.help="dockertexstudio --help" \
24 | org.label-schema.usage="https://gitlab.com/raabf/dockertex/blob/master/README.md" \
25 | org.label-schema.schema-version="1.0"
26 |
27 | ENV DEBIAN_FRONTEND noninteractive
28 |
29 | # for the modern KDE Plasma look (configurable in texstudio options)
30 | RUN apt-get update && \
31 | apt-get install --quiet --yes kde-style-breeze
32 |
33 | # install texstudio
34 | # (A newer version from the developer, since the version in the
35 | # standard repository is quite old)
36 | RUN wget -O texstudio.deb "http://download.opensuse.org/repositories/home:/jsundermeyer/xUbuntu_16.04/amd64/texstudio_${TEXSTUDIO_VERSION}_amd64.deb" && \
37 | apt-get install --quiet --yes ./texstudio.deb && \
38 | command -v texstudio >/dev/null 2>&1 && \
39 | rm texstudio.deb && \
40 | apt-get clean && \
41 | rm -rf /var/lib/apt/lists/* && \
42 | rm -rf /tmp/*
43 |
44 | VOLUME [ "/home/.config/texstudio" ]
45 |
46 | CMD [ "texstudio" ]
47 |
--------------------------------------------------------------------------------